update vendor

Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
This commit is contained in:
Jess Frazelle 2018-09-25 12:27:46 -04:00
parent 19a32db84d
commit 94d1cfbfbf
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
10501 changed files with 2307943 additions and 29279 deletions

View file

@ -0,0 +1,668 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/asset/v1beta1/asset_service.proto
package asset
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
math "math"
)
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
// Asset content type.
type ContentType int32
const (
// Unspecified content type.
ContentType_CONTENT_TYPE_UNSPECIFIED ContentType = 0
// Resource metadata.
ContentType_RESOURCE ContentType = 1
// The actual IAM policy set on a resource.
ContentType_IAM_POLICY ContentType = 2
)
var ContentType_name = map[int32]string{
0: "CONTENT_TYPE_UNSPECIFIED",
1: "RESOURCE",
2: "IAM_POLICY",
}
var ContentType_value = map[string]int32{
"CONTENT_TYPE_UNSPECIFIED": 0,
"RESOURCE": 1,
"IAM_POLICY": 2,
}
func (x ContentType) String() string {
return proto.EnumName(ContentType_name, int32(x))
}
func (ContentType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{0}
}
// Export asset request.
type ExportAssetsRequest struct {
// Required. The relative name of the root asset. Can only be an organization
// number (such as "organizations/123"), or a project id (such as
// "projects/my-project-id") or a project number (such as "projects/12345").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Timestamp to take an asset snapshot. This can only be set to a timestamp in
// the past or of the current time. If not specified, the current time will be
// used. Due to delays in resource data collection and indexing, there is a
// volatile window during which running the same query may get different
// results.
ReadTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// A list of asset types of which to take a snapshot for. Example:
// "google.compute.disk". If specified, only matching assets will be returned.
AssetTypes []string `protobuf:"bytes,3,rep,name=asset_types,json=assetTypes,proto3" json:"asset_types,omitempty"`
// Asset content type. If not specified, no content but the asset name will be
// returned.
ContentType ContentType `protobuf:"varint,4,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1beta1.ContentType" json:"content_type,omitempty"`
// Required. Output configuration indicating where the results will be output
// to. All results will be in newline delimited JSON format.
OutputConfig *OutputConfig `protobuf:"bytes,5,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExportAssetsRequest) Reset() { *m = ExportAssetsRequest{} }
func (m *ExportAssetsRequest) String() string { return proto.CompactTextString(m) }
func (*ExportAssetsRequest) ProtoMessage() {}
func (*ExportAssetsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{0}
}
func (m *ExportAssetsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExportAssetsRequest.Unmarshal(m, b)
}
func (m *ExportAssetsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExportAssetsRequest.Marshal(b, m, deterministic)
}
func (m *ExportAssetsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExportAssetsRequest.Merge(m, src)
}
func (m *ExportAssetsRequest) XXX_Size() int {
return xxx_messageInfo_ExportAssetsRequest.Size(m)
}
func (m *ExportAssetsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ExportAssetsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ExportAssetsRequest proto.InternalMessageInfo
func (m *ExportAssetsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ExportAssetsRequest) GetReadTime() *timestamp.Timestamp {
if m != nil {
return m.ReadTime
}
return nil
}
func (m *ExportAssetsRequest) GetAssetTypes() []string {
if m != nil {
return m.AssetTypes
}
return nil
}
func (m *ExportAssetsRequest) GetContentType() ContentType {
if m != nil {
return m.ContentType
}
return ContentType_CONTENT_TYPE_UNSPECIFIED
}
func (m *ExportAssetsRequest) GetOutputConfig() *OutputConfig {
if m != nil {
return m.OutputConfig
}
return nil
}
// The export asset response. This message is returned by the
// [google.longrunning.Operations.GetOperation][google.longrunning.Operations.GetOperation] method in the returned
// [google.longrunning.Operation.response][google.longrunning.Operation.response] field.
type ExportAssetsResponse struct {
// Time the snapshot was taken.
ReadTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=read_time,json=readTime,proto3" json:"read_time,omitempty"`
// Output configuration indicating where the results were output to.
// All results are in JSON format.
OutputConfig *OutputConfig `protobuf:"bytes,2,opt,name=output_config,json=outputConfig,proto3" json:"output_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExportAssetsResponse) Reset() { *m = ExportAssetsResponse{} }
func (m *ExportAssetsResponse) String() string { return proto.CompactTextString(m) }
func (*ExportAssetsResponse) ProtoMessage() {}
func (*ExportAssetsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{1}
}
func (m *ExportAssetsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExportAssetsResponse.Unmarshal(m, b)
}
func (m *ExportAssetsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExportAssetsResponse.Marshal(b, m, deterministic)
}
func (m *ExportAssetsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExportAssetsResponse.Merge(m, src)
}
func (m *ExportAssetsResponse) XXX_Size() int {
return xxx_messageInfo_ExportAssetsResponse.Size(m)
}
func (m *ExportAssetsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ExportAssetsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ExportAssetsResponse proto.InternalMessageInfo
func (m *ExportAssetsResponse) GetReadTime() *timestamp.Timestamp {
if m != nil {
return m.ReadTime
}
return nil
}
func (m *ExportAssetsResponse) GetOutputConfig() *OutputConfig {
if m != nil {
return m.OutputConfig
}
return nil
}
// Batch get assets history request.
type BatchGetAssetsHistoryRequest struct {
// Required. The relative name of the root asset. It can only be an
// organization number (such as "organizations/123"), or a project id (such as
// "projects/my-project-id")"or a project number (such as "projects/12345").
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// A list of the full names of the assets. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
// Example:
// "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1".
//
// The request becomes a no-op if the asset name list is empty, and the max
// size of the asset name list is 100 in one request.
AssetNames []string `protobuf:"bytes,2,rep,name=asset_names,json=assetNames,proto3" json:"asset_names,omitempty"`
// Required. The content type.
ContentType ContentType `protobuf:"varint,3,opt,name=content_type,json=contentType,proto3,enum=google.cloud.asset.v1beta1.ContentType" json:"content_type,omitempty"`
// Required. The time window for the asset history. The start time is
// required. The returned results contain all temporal assets whose time
// window overlap with read_time_window.
ReadTimeWindow *TimeWindow `protobuf:"bytes,4,opt,name=read_time_window,json=readTimeWindow,proto3" json:"read_time_window,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchGetAssetsHistoryRequest) Reset() { *m = BatchGetAssetsHistoryRequest{} }
func (m *BatchGetAssetsHistoryRequest) String() string { return proto.CompactTextString(m) }
func (*BatchGetAssetsHistoryRequest) ProtoMessage() {}
func (*BatchGetAssetsHistoryRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{2}
}
func (m *BatchGetAssetsHistoryRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchGetAssetsHistoryRequest.Unmarshal(m, b)
}
func (m *BatchGetAssetsHistoryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchGetAssetsHistoryRequest.Marshal(b, m, deterministic)
}
func (m *BatchGetAssetsHistoryRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchGetAssetsHistoryRequest.Merge(m, src)
}
func (m *BatchGetAssetsHistoryRequest) XXX_Size() int {
return xxx_messageInfo_BatchGetAssetsHistoryRequest.Size(m)
}
func (m *BatchGetAssetsHistoryRequest) XXX_DiscardUnknown() {
xxx_messageInfo_BatchGetAssetsHistoryRequest.DiscardUnknown(m)
}
var xxx_messageInfo_BatchGetAssetsHistoryRequest proto.InternalMessageInfo
func (m *BatchGetAssetsHistoryRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *BatchGetAssetsHistoryRequest) GetAssetNames() []string {
if m != nil {
return m.AssetNames
}
return nil
}
func (m *BatchGetAssetsHistoryRequest) GetContentType() ContentType {
if m != nil {
return m.ContentType
}
return ContentType_CONTENT_TYPE_UNSPECIFIED
}
func (m *BatchGetAssetsHistoryRequest) GetReadTimeWindow() *TimeWindow {
if m != nil {
return m.ReadTimeWindow
}
return nil
}
// Batch get assets history response.
type BatchGetAssetsHistoryResponse struct {
// A list of assets with valid time windows.
Assets []*TemporalAsset `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BatchGetAssetsHistoryResponse) Reset() { *m = BatchGetAssetsHistoryResponse{} }
func (m *BatchGetAssetsHistoryResponse) String() string { return proto.CompactTextString(m) }
func (*BatchGetAssetsHistoryResponse) ProtoMessage() {}
func (*BatchGetAssetsHistoryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{3}
}
func (m *BatchGetAssetsHistoryResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchGetAssetsHistoryResponse.Unmarshal(m, b)
}
func (m *BatchGetAssetsHistoryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchGetAssetsHistoryResponse.Marshal(b, m, deterministic)
}
func (m *BatchGetAssetsHistoryResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchGetAssetsHistoryResponse.Merge(m, src)
}
func (m *BatchGetAssetsHistoryResponse) XXX_Size() int {
return xxx_messageInfo_BatchGetAssetsHistoryResponse.Size(m)
}
func (m *BatchGetAssetsHistoryResponse) XXX_DiscardUnknown() {
xxx_messageInfo_BatchGetAssetsHistoryResponse.DiscardUnknown(m)
}
var xxx_messageInfo_BatchGetAssetsHistoryResponse proto.InternalMessageInfo
func (m *BatchGetAssetsHistoryResponse) GetAssets() []*TemporalAsset {
if m != nil {
return m.Assets
}
return nil
}
// Output configuration for export assets destination.
type OutputConfig struct {
// Asset export destination.
//
// Types that are valid to be assigned to Destination:
// *OutputConfig_GcsDestination
Destination isOutputConfig_Destination `protobuf_oneof:"destination"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OutputConfig) Reset() { *m = OutputConfig{} }
func (m *OutputConfig) String() string { return proto.CompactTextString(m) }
func (*OutputConfig) ProtoMessage() {}
func (*OutputConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{4}
}
func (m *OutputConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OutputConfig.Unmarshal(m, b)
}
func (m *OutputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OutputConfig.Marshal(b, m, deterministic)
}
func (m *OutputConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_OutputConfig.Merge(m, src)
}
func (m *OutputConfig) XXX_Size() int {
return xxx_messageInfo_OutputConfig.Size(m)
}
func (m *OutputConfig) XXX_DiscardUnknown() {
xxx_messageInfo_OutputConfig.DiscardUnknown(m)
}
var xxx_messageInfo_OutputConfig proto.InternalMessageInfo
type isOutputConfig_Destination interface {
isOutputConfig_Destination()
}
type OutputConfig_GcsDestination struct {
GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"`
}
func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {}
func (m *OutputConfig) GetDestination() isOutputConfig_Destination {
if m != nil {
return m.Destination
}
return nil
}
func (m *OutputConfig) GetGcsDestination() *GcsDestination {
if x, ok := m.GetDestination().(*OutputConfig_GcsDestination); ok {
return x.GcsDestination
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*OutputConfig) 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 _OutputConfig_OneofMarshaler, _OutputConfig_OneofUnmarshaler, _OutputConfig_OneofSizer, []interface{}{
(*OutputConfig_GcsDestination)(nil),
}
}
func _OutputConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*OutputConfig)
// destination
switch x := m.Destination.(type) {
case *OutputConfig_GcsDestination:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GcsDestination); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("OutputConfig.Destination has unexpected type %T", x)
}
return nil
}
func _OutputConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*OutputConfig)
switch tag {
case 1: // destination.gcs_destination
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GcsDestination)
err := b.DecodeMessage(msg)
m.Destination = &OutputConfig_GcsDestination{msg}
return true, err
default:
return false, nil
}
}
func _OutputConfig_OneofSizer(msg proto.Message) (n int) {
m := msg.(*OutputConfig)
// destination
switch x := m.Destination.(type) {
case *OutputConfig_GcsDestination:
s := proto.Size(x.GcsDestination)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A Google Cloud Storage (GCS) location.
type GcsDestination struct {
// The path of the GCS objects. It's the same path that is used by gsutil, for
// example: "gs://bucket_name/object_path". See:
// https://cloud.google.com/storage/docs/viewing-editing-metadata for more
// information.
Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GcsDestination) Reset() { *m = GcsDestination{} }
func (m *GcsDestination) String() string { return proto.CompactTextString(m) }
func (*GcsDestination) ProtoMessage() {}
func (*GcsDestination) Descriptor() ([]byte, []int) {
return fileDescriptor_565cfbddaa85b7d6, []int{5}
}
func (m *GcsDestination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GcsDestination.Unmarshal(m, b)
}
func (m *GcsDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GcsDestination.Marshal(b, m, deterministic)
}
func (m *GcsDestination) XXX_Merge(src proto.Message) {
xxx_messageInfo_GcsDestination.Merge(m, src)
}
func (m *GcsDestination) XXX_Size() int {
return xxx_messageInfo_GcsDestination.Size(m)
}
func (m *GcsDestination) XXX_DiscardUnknown() {
xxx_messageInfo_GcsDestination.DiscardUnknown(m)
}
var xxx_messageInfo_GcsDestination proto.InternalMessageInfo
func (m *GcsDestination) GetUri() string {
if m != nil {
return m.Uri
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.asset.v1beta1.ContentType", ContentType_name, ContentType_value)
proto.RegisterType((*ExportAssetsRequest)(nil), "google.cloud.asset.v1beta1.ExportAssetsRequest")
proto.RegisterType((*ExportAssetsResponse)(nil), "google.cloud.asset.v1beta1.ExportAssetsResponse")
proto.RegisterType((*BatchGetAssetsHistoryRequest)(nil), "google.cloud.asset.v1beta1.BatchGetAssetsHistoryRequest")
proto.RegisterType((*BatchGetAssetsHistoryResponse)(nil), "google.cloud.asset.v1beta1.BatchGetAssetsHistoryResponse")
proto.RegisterType((*OutputConfig)(nil), "google.cloud.asset.v1beta1.OutputConfig")
proto.RegisterType((*GcsDestination)(nil), "google.cloud.asset.v1beta1.GcsDestination")
}
// 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
// AssetServiceClient is the client API for AssetService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type AssetServiceClient interface {
// Exports assets with time and resource types to a given Google Cloud Storage
// location. The output format is newline-delimited JSON.
// This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing users
// to keep track of the export.
ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
// Batch gets assets update history that overlaps a time window.
// For RESOURCE content, this API outputs history with asset in both
// non-delete or deleted status.
// For IAM_POLICY content, this API only outputs history when asset and its
// attached IAM POLICY both exist. So there may be gaps in the output history.
BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error)
}
type assetServiceClient struct {
cc *grpc.ClientConn
}
func NewAssetServiceClient(cc *grpc.ClientConn) AssetServiceClient {
return &assetServiceClient{cc}
}
func (c *assetServiceClient) ExportAssets(ctx context.Context, in *ExportAssetsRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
out := new(longrunning.Operation)
err := c.cc.Invoke(ctx, "/google.cloud.asset.v1beta1.AssetService/ExportAssets", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *assetServiceClient) BatchGetAssetsHistory(ctx context.Context, in *BatchGetAssetsHistoryRequest, opts ...grpc.CallOption) (*BatchGetAssetsHistoryResponse, error) {
out := new(BatchGetAssetsHistoryResponse)
err := c.cc.Invoke(ctx, "/google.cloud.asset.v1beta1.AssetService/BatchGetAssetsHistory", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// AssetServiceServer is the server API for AssetService service.
type AssetServiceServer interface {
// Exports assets with time and resource types to a given Google Cloud Storage
// location. The output format is newline-delimited JSON.
// This API implements the [google.longrunning.Operation][google.longrunning.Operation] API allowing users
// to keep track of the export.
ExportAssets(context.Context, *ExportAssetsRequest) (*longrunning.Operation, error)
// Batch gets assets update history that overlaps a time window.
// For RESOURCE content, this API outputs history with asset in both
// non-delete or deleted status.
// For IAM_POLICY content, this API only outputs history when asset and its
// attached IAM POLICY both exist. So there may be gaps in the output history.
BatchGetAssetsHistory(context.Context, *BatchGetAssetsHistoryRequest) (*BatchGetAssetsHistoryResponse, error)
}
func RegisterAssetServiceServer(s *grpc.Server, srv AssetServiceServer) {
s.RegisterService(&_AssetService_serviceDesc, srv)
}
func _AssetService_ExportAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ExportAssetsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AssetServiceServer).ExportAssets(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.asset.v1beta1.AssetService/ExportAssets",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AssetServiceServer).ExportAssets(ctx, req.(*ExportAssetsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _AssetService_BatchGetAssetsHistory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BatchGetAssetsHistoryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.asset.v1beta1.AssetService/BatchGetAssetsHistory",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(AssetServiceServer).BatchGetAssetsHistory(ctx, req.(*BatchGetAssetsHistoryRequest))
}
return interceptor(ctx, in, info, handler)
}
var _AssetService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.asset.v1beta1.AssetService",
HandlerType: (*AssetServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ExportAssets",
Handler: _AssetService_ExportAssets_Handler,
},
{
MethodName: "BatchGetAssetsHistory",
Handler: _AssetService_BatchGetAssetsHistory_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/asset/v1beta1/asset_service.proto",
}
func init() {
proto.RegisterFile("google/cloud/asset/v1beta1/asset_service.proto", fileDescriptor_565cfbddaa85b7d6)
}
var fileDescriptor_565cfbddaa85b7d6 = []byte{
// 766 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x4e, 0xdb, 0x4a,
0x14, 0xc6, 0xce, 0xbd, 0x08, 0x26, 0x21, 0x37, 0x77, 0xfa, 0x23, 0x2b, 0x82, 0x12, 0xb9, 0x52,
0x09, 0x59, 0xd8, 0x22, 0x48, 0x2d, 0xa5, 0xaa, 0x2a, 0x12, 0x52, 0x48, 0x55, 0x92, 0xc8, 0x04,
0x2a, 0x10, 0x92, 0x35, 0x71, 0x06, 0xd7, 0x55, 0x32, 0xe3, 0x7a, 0x26, 0x50, 0x5a, 0x75, 0xc3,
0x2b, 0x74, 0xdf, 0x45, 0x97, 0x5d, 0xf5, 0x35, 0xda, 0x6d, 0x1f, 0xa0, 0x9b, 0xbe, 0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 0x43, 0x82, 0xa7, 0x2a, 0xb8, 0x35,
0x76, 0x4c, 0xe0, 0x4a, 0x52, 0x51, 0x49, 0x1f, 0x54, 0xfe, 0xe1, 0x5f, 0x30, 0xe5, 0x4c, 0xea,
0x5c, 0x54, 0x4e, 0x60, 0x39, 0xb1, 0xf2, 0xce, 0x38, 0x8d, 0xfd, 0x15, 0x78, 0xff, 0xea, 0xfa,
0x47, 0xa8, 0x11, 0xb3, 0xf2, 0x45, 0x01, 0x77, 0x1c, 0xda, 0x4f, 0x78, 0x76, 0xe5, 0xff, 0xf8,
0x04, 0xb4, 0xc2, 0xf5, 0xd5, 0x52, 0xf6, 0x9f, 0x44, 0x04, 0x97, 0xf6, 0x10, 0x71, 0x0d, 0x1a,
0xb8, 0xa6, 0x8b, 0x89, 0x58, 0x6e, 0xa6, 0xbc, 0x42, 0xbe, 0xc7, 0xc6, 0xfd, 0x5d, 0x3d, 0x12,
0xd1, 0x67, 0x35, 0xbf, 0x21, 0x15, 0xaa, 0x22, 0xa5, 0xc8, 0x61, 0xec, 0x2e, 0x55, 0x42, 0xc8,
0xb7, 0xe1, 0xe5, 0x81, 0xb8, 0x3c, 0x10, 0x97, 0x07, 0xbb, 0x92, 0xdf, 0x99, 0x14, 0x59, 0x96,
0x7f, 0x07, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x92, 0x02, 0xa5, 0x7d, 0x07, 0x00, 0x00,
}

View file

@ -0,0 +1,364 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/asset/v1beta1/assets.proto
package asset
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/any"
_struct "github.com/golang/protobuf/ptypes/struct"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
v1 "google.golang.org/genproto/googleapis/iam/v1"
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
// Temporal asset. In addition to the asset, the temporal asset includes the
// status of the asset and valid from and to time of it.
type TemporalAsset struct {
// The time window when the asset data and state was observed.
Window *TimeWindow `protobuf:"bytes,1,opt,name=window,proto3" json:"window,omitempty"`
// If the asset is deleted or not.
Deleted bool `protobuf:"varint,2,opt,name=deleted,proto3" json:"deleted,omitempty"`
// Asset.
Asset *Asset `protobuf:"bytes,3,opt,name=asset,proto3" json:"asset,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TemporalAsset) Reset() { *m = TemporalAsset{} }
func (m *TemporalAsset) String() string { return proto.CompactTextString(m) }
func (*TemporalAsset) ProtoMessage() {}
func (*TemporalAsset) Descriptor() ([]byte, []int) {
return fileDescriptor_2e0a79b6d8a101c1, []int{0}
}
func (m *TemporalAsset) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TemporalAsset.Unmarshal(m, b)
}
func (m *TemporalAsset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TemporalAsset.Marshal(b, m, deterministic)
}
func (m *TemporalAsset) XXX_Merge(src proto.Message) {
xxx_messageInfo_TemporalAsset.Merge(m, src)
}
func (m *TemporalAsset) XXX_Size() int {
return xxx_messageInfo_TemporalAsset.Size(m)
}
func (m *TemporalAsset) XXX_DiscardUnknown() {
xxx_messageInfo_TemporalAsset.DiscardUnknown(m)
}
var xxx_messageInfo_TemporalAsset proto.InternalMessageInfo
func (m *TemporalAsset) GetWindow() *TimeWindow {
if m != nil {
return m.Window
}
return nil
}
func (m *TemporalAsset) GetDeleted() bool {
if m != nil {
return m.Deleted
}
return false
}
func (m *TemporalAsset) GetAsset() *Asset {
if m != nil {
return m.Asset
}
return nil
}
// A time window of [start_time, end_time).
type TimeWindow struct {
// Start time of the time window (inclusive).
StartTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// End time of the time window (exclusive).
// Current timestamp if not specified.
EndTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TimeWindow) Reset() { *m = TimeWindow{} }
func (m *TimeWindow) String() string { return proto.CompactTextString(m) }
func (*TimeWindow) ProtoMessage() {}
func (*TimeWindow) Descriptor() ([]byte, []int) {
return fileDescriptor_2e0a79b6d8a101c1, []int{1}
}
func (m *TimeWindow) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TimeWindow.Unmarshal(m, b)
}
func (m *TimeWindow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TimeWindow.Marshal(b, m, deterministic)
}
func (m *TimeWindow) XXX_Merge(src proto.Message) {
xxx_messageInfo_TimeWindow.Merge(m, src)
}
func (m *TimeWindow) XXX_Size() int {
return xxx_messageInfo_TimeWindow.Size(m)
}
func (m *TimeWindow) XXX_DiscardUnknown() {
xxx_messageInfo_TimeWindow.DiscardUnknown(m)
}
var xxx_messageInfo_TimeWindow proto.InternalMessageInfo
func (m *TimeWindow) GetStartTime() *timestamp.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *TimeWindow) GetEndTime() *timestamp.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
// Cloud asset. This include all Google Cloud Platform resources, as well as
// IAM policies and other non-GCP assets.
type Asset struct {
// The full name of the asset. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
// Example:
// "//compute.googleapis.com/projects/my_project_123/zones/zone1/instances/instance1".
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Type of the asset. Example: "google.compute.disk".
AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"`
// Representation of the resource.
Resource *Resource `protobuf:"bytes,3,opt,name=resource,proto3" json:"resource,omitempty"`
// Representation of the actual IAM policy set on a cloud resource. For each
// resource, there must be at most one IAM policy set on it.
IamPolicy *v1.Policy `protobuf:"bytes,4,opt,name=iam_policy,json=iamPolicy,proto3" json:"iam_policy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Asset) Reset() { *m = Asset{} }
func (m *Asset) String() string { return proto.CompactTextString(m) }
func (*Asset) ProtoMessage() {}
func (*Asset) Descriptor() ([]byte, []int) {
return fileDescriptor_2e0a79b6d8a101c1, []int{2}
}
func (m *Asset) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Asset.Unmarshal(m, b)
}
func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Asset.Marshal(b, m, deterministic)
}
func (m *Asset) XXX_Merge(src proto.Message) {
xxx_messageInfo_Asset.Merge(m, src)
}
func (m *Asset) XXX_Size() int {
return xxx_messageInfo_Asset.Size(m)
}
func (m *Asset) XXX_DiscardUnknown() {
xxx_messageInfo_Asset.DiscardUnknown(m)
}
var xxx_messageInfo_Asset proto.InternalMessageInfo
func (m *Asset) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Asset) GetAssetType() string {
if m != nil {
return m.AssetType
}
return ""
}
func (m *Asset) GetResource() *Resource {
if m != nil {
return m.Resource
}
return nil
}
func (m *Asset) GetIamPolicy() *v1.Policy {
if m != nil {
return m.IamPolicy
}
return nil
}
// Representation of a cloud resource.
type Resource struct {
// The API version. Example: "v1".
Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
// The URL of the discovery document containing the resource's JSON schema.
// Example:
// "https://www.googleapis.com/discovery/v1/apis/compute/v1/rest".
// It will be left unspecified for resources without a discovery-based API,
// such as Cloud Bigtable.
DiscoveryDocumentUri string `protobuf:"bytes,2,opt,name=discovery_document_uri,json=discoveryDocumentUri,proto3" json:"discovery_document_uri,omitempty"`
// The JSON schema name listed in the discovery document.
// Example: "Project". It will be left unspecified for resources (such as
// Cloud Bigtable) without a discovery-based API.
DiscoveryName string `protobuf:"bytes,3,opt,name=discovery_name,json=discoveryName,proto3" json:"discovery_name,omitempty"`
// The REST URL for accessing the resource. An HTTP GET operation using this
// URL returns the resource itself.
// Example:
// `https://cloudresourcemanager.googleapis.com/v1/projects/my-project-123`.
// It will be left unspecified for resources without a REST API.
ResourceUrl string `protobuf:"bytes,4,opt,name=resource_url,json=resourceUrl,proto3" json:"resource_url,omitempty"`
// The full name of the immediate parent of this resource. See:
// https://cloud.google.com/apis/design/resource_names#full_resource_name
//
// For GCP assets, it is the parent resource defined in the IAM policy
// hierarchy: https://cloud.google.com/iam/docs/overview#policy_hierarchy.
// Example: "//cloudresourcemanager.googleapis.com/projects/my_project_123".
//
// For third-party assets, it is up to the users to define.
Parent string `protobuf:"bytes,5,opt,name=parent,proto3" json:"parent,omitempty"`
// The content of the resource, in which some sensitive fields are scrubbed
// away and may not be present.
Data *_struct.Struct `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Resource) Reset() { *m = Resource{} }
func (m *Resource) String() string { return proto.CompactTextString(m) }
func (*Resource) ProtoMessage() {}
func (*Resource) Descriptor() ([]byte, []int) {
return fileDescriptor_2e0a79b6d8a101c1, []int{3}
}
func (m *Resource) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Resource.Unmarshal(m, b)
}
func (m *Resource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Resource.Marshal(b, m, deterministic)
}
func (m *Resource) XXX_Merge(src proto.Message) {
xxx_messageInfo_Resource.Merge(m, src)
}
func (m *Resource) XXX_Size() int {
return xxx_messageInfo_Resource.Size(m)
}
func (m *Resource) XXX_DiscardUnknown() {
xxx_messageInfo_Resource.DiscardUnknown(m)
}
var xxx_messageInfo_Resource proto.InternalMessageInfo
func (m *Resource) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *Resource) GetDiscoveryDocumentUri() string {
if m != nil {
return m.DiscoveryDocumentUri
}
return ""
}
func (m *Resource) GetDiscoveryName() string {
if m != nil {
return m.DiscoveryName
}
return ""
}
func (m *Resource) GetResourceUrl() string {
if m != nil {
return m.ResourceUrl
}
return ""
}
func (m *Resource) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *Resource) GetData() *_struct.Struct {
if m != nil {
return m.Data
}
return nil
}
func init() {
proto.RegisterType((*TemporalAsset)(nil), "google.cloud.asset.v1beta1.TemporalAsset")
proto.RegisterType((*TimeWindow)(nil), "google.cloud.asset.v1beta1.TimeWindow")
proto.RegisterType((*Asset)(nil), "google.cloud.asset.v1beta1.Asset")
proto.RegisterType((*Resource)(nil), "google.cloud.asset.v1beta1.Resource")
}
func init() {
proto.RegisterFile("google/cloud/asset/v1beta1/assets.proto", fileDescriptor_2e0a79b6d8a101c1)
}
var fileDescriptor_2e0a79b6d8a101c1 = []byte{
// 551 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x53, 0xdb, 0x6a, 0xd4, 0x40,
0x18, 0x26, 0xed, 0xee, 0x76, 0xf3, 0xd7, 0x7a, 0x31, 0x68, 0x8d, 0x4b, 0xd5, 0x76, 0xf1, 0x50,
0x10, 0x12, 0x56, 0x2b, 0x22, 0x82, 0x87, 0x55, 0xf0, 0x4e, 0x96, 0x71, 0x5b, 0x41, 0x16, 0xc2,
0x6c, 0x32, 0x86, 0x81, 0x64, 0x26, 0x4c, 0x26, 0x29, 0x7b, 0xe3, 0xc3, 0x78, 0xa7, 0x97, 0x3e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0xdd,
0x6e, 0xed, 0x54, 0xe7, 0x64, 0x1f, 0x06, 0x25, 0xd3, 0x5c, 0x9a, 0xa0, 0x8f, 0xa4, 0x43, 0xe4,
0x21, 0xf4, 0x52, 0x66, 0x58, 0x30, 0xc0, 0xba, 0x37, 0xfe, 0xb8, 0xa6, 0x0f, 0xf8, 0xcc, 0x29,
0x8a, 0xa6, 0xdf, 0x3c, 0xb8, 0x9d, 0xa8, 0x62, 0xc3, 0xb9, 0x4e, 0x01, 0x2f, 0x70, 0xd6, 0xda,
0x67, 0xde, 0xa7, 0x97, 0x4e, 0x99, 0xa9, 0x9c, 0xc9, 0x2c, 0x54, 0x3a, 0x8b, 0x32, 0x2e, 0x31,
0x3c, 0xb2, 0x14, 0x2b, 0x45, 0xf5, 0xb7, 0xdf, 0xfd, 0x39, 0xa2, 0xef, 0x5b, 0xa3, 0x77, 0x36,
0xe1, 0x0d, 0xee, 0x85, 0xe1, 0xe1, 0xd9, 0x64, 0xda, 0x4a, 0x7e, 0x76, 0xe4, 0x02, 0xc9, 0x05,
0x92, 0x8b, 0x33, 0xeb, 0x5f, 0x0e, 0x70, 0x97, 0xc7, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x07,
0x7f, 0x2e, 0x7b, 0x53, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,392 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/audit/audit_log.proto
package audit
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// 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,proto3" 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,proto3" 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,proto3" 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,proto3" json:"num_response_items,omitempty"`
// The status of the overall operation.
Status *status.Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
// Authentication information.
AuthenticationInfo *AuthenticationInfo `protobuf:"bytes,3,opt,name=authentication_info,json=authenticationInfo,proto3" 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,proto3" json:"authorization_info,omitempty"`
// Metadata about the operation.
RequestMetadata *RequestMetadata `protobuf:"bytes,4,opt,name=request_metadata,json=requestMetadata,proto3" 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 *_struct.Struct `protobuf:"bytes,16,opt,name=request,proto3" 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 *_struct.Struct `protobuf:"bytes,17,opt,name=response,proto3" json:"response,omitempty"`
// Other service-specific data about the request, response, and other
// activities.
ServiceData *any.Any `protobuf:"bytes,15,opt,name=service_data,json=serviceData,proto3" json:"service_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AuditLog) Reset() { *m = AuditLog{} }
func (m *AuditLog) String() string { return proto.CompactTextString(m) }
func (*AuditLog) ProtoMessage() {}
func (*AuditLog) Descriptor() ([]byte, []int) {
return fileDescriptor_197799a4334e4cbf, []int{0}
}
func (m *AuditLog) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AuditLog.Unmarshal(m, b)
}
func (m *AuditLog) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AuditLog.Marshal(b, m, deterministic)
}
func (m *AuditLog) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuditLog.Merge(m, src)
}
func (m *AuditLog) XXX_Size() int {
return xxx_messageInfo_AuditLog.Size(m)
}
func (m *AuditLog) XXX_DiscardUnknown() {
xxx_messageInfo_AuditLog.DiscardUnknown(m)
}
var xxx_messageInfo_AuditLog proto.InternalMessageInfo
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() *status.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() *_struct.Struct {
if m != nil {
return m.Request
}
return nil
}
func (m *AuditLog) GetResponse() *_struct.Struct {
if m != nil {
return m.Response
}
return nil
}
func (m *AuditLog) GetServiceData() *any.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,proto3" json:"principal_email,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AuthenticationInfo) Reset() { *m = AuthenticationInfo{} }
func (m *AuthenticationInfo) String() string { return proto.CompactTextString(m) }
func (*AuthenticationInfo) ProtoMessage() {}
func (*AuthenticationInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_197799a4334e4cbf, []int{1}
}
func (m *AuthenticationInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AuthenticationInfo.Unmarshal(m, b)
}
func (m *AuthenticationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AuthenticationInfo.Marshal(b, m, deterministic)
}
func (m *AuthenticationInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuthenticationInfo.Merge(m, src)
}
func (m *AuthenticationInfo) XXX_Size() int {
return xxx_messageInfo_AuthenticationInfo.Size(m)
}
func (m *AuthenticationInfo) XXX_DiscardUnknown() {
xxx_messageInfo_AuthenticationInfo.DiscardUnknown(m)
}
var xxx_messageInfo_AuthenticationInfo proto.InternalMessageInfo
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,proto3" json:"resource,omitempty"`
// The required IAM permission.
Permission string `protobuf:"bytes,2,opt,name=permission,proto3" json:"permission,omitempty"`
// Whether or not authorization for `resource` and `permission`
// was granted.
Granted bool `protobuf:"varint,3,opt,name=granted,proto3" json:"granted,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AuthorizationInfo) Reset() { *m = AuthorizationInfo{} }
func (m *AuthorizationInfo) String() string { return proto.CompactTextString(m) }
func (*AuthorizationInfo) ProtoMessage() {}
func (*AuthorizationInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_197799a4334e4cbf, []int{2}
}
func (m *AuthorizationInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AuthorizationInfo.Unmarshal(m, b)
}
func (m *AuthorizationInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AuthorizationInfo.Marshal(b, m, deterministic)
}
func (m *AuthorizationInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_AuthorizationInfo.Merge(m, src)
}
func (m *AuthorizationInfo) XXX_Size() int {
return xxx_messageInfo_AuthorizationInfo.Size(m)
}
func (m *AuthorizationInfo) XXX_DiscardUnknown() {
xxx_messageInfo_AuthorizationInfo.DiscardUnknown(m)
}
var xxx_messageInfo_AuthorizationInfo proto.InternalMessageInfo
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,proto3" 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,proto3" json:"caller_supplied_user_agent,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RequestMetadata) Reset() { *m = RequestMetadata{} }
func (m *RequestMetadata) String() string { return proto.CompactTextString(m) }
func (*RequestMetadata) ProtoMessage() {}
func (*RequestMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_197799a4334e4cbf, []int{3}
}
func (m *RequestMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RequestMetadata.Unmarshal(m, b)
}
func (m *RequestMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RequestMetadata.Marshal(b, m, deterministic)
}
func (m *RequestMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_RequestMetadata.Merge(m, src)
}
func (m *RequestMetadata) XXX_Size() int {
return xxx_messageInfo_RequestMetadata.Size(m)
}
func (m *RequestMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_RequestMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_RequestMetadata proto.InternalMessageInfo
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", fileDescriptor_197799a4334e4cbf) }
var fileDescriptor_197799a4334e4cbf = []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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3b, 0x9e, 0xfc, 0xe2, 0xb0, 0xfe, 0x77,
0x5e, 0x2d, 0x67, 0x7a, 0xd5, 0xf8, 0x76, 0xe6, 0xa1, 0x5c, 0x16, 0x4c, 0xe4, 0xa1, 0xd4, 0x79,
0x94, 0x83, 0xc0, 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,227 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/annotation_payload.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Contains annotation information that is relevant to AutoML.
type AnnotationPayload struct {
// Output only . Additional information about the annotation
// specific to the AutoML solution.
//
// Types that are valid to be assigned to Detail:
// *AnnotationPayload_Translation
// *AnnotationPayload_Classification
Detail isAnnotationPayload_Detail `protobuf_oneof:"detail"`
// Output only . The resource ID of the annotation spec that
// this annotation pertains to. The annotation spec comes from either an
// ancestor dataset, or the dataset that was used to train the model in use.
AnnotationSpecId string `protobuf:"bytes,1,opt,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"`
// Output only. The value of [AnnotationSpec.display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name] when the model
// was trained. Because this field returns a value at model training time,
// for different models trained using the same dataset, the returned value
// could be different as model owner could update the display_name between
// any two model training.
DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AnnotationPayload) Reset() { *m = AnnotationPayload{} }
func (m *AnnotationPayload) String() string { return proto.CompactTextString(m) }
func (*AnnotationPayload) ProtoMessage() {}
func (*AnnotationPayload) Descriptor() ([]byte, []int) {
return fileDescriptor_cb8fb684261d0460, []int{0}
}
func (m *AnnotationPayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AnnotationPayload.Unmarshal(m, b)
}
func (m *AnnotationPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AnnotationPayload.Marshal(b, m, deterministic)
}
func (m *AnnotationPayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_AnnotationPayload.Merge(m, src)
}
func (m *AnnotationPayload) XXX_Size() int {
return xxx_messageInfo_AnnotationPayload.Size(m)
}
func (m *AnnotationPayload) XXX_DiscardUnknown() {
xxx_messageInfo_AnnotationPayload.DiscardUnknown(m)
}
var xxx_messageInfo_AnnotationPayload proto.InternalMessageInfo
type isAnnotationPayload_Detail interface {
isAnnotationPayload_Detail()
}
type AnnotationPayload_Translation struct {
Translation *TranslationAnnotation `protobuf:"bytes,2,opt,name=translation,proto3,oneof"`
}
type AnnotationPayload_Classification struct {
Classification *ClassificationAnnotation `protobuf:"bytes,3,opt,name=classification,proto3,oneof"`
}
func (*AnnotationPayload_Translation) isAnnotationPayload_Detail() {}
func (*AnnotationPayload_Classification) isAnnotationPayload_Detail() {}
func (m *AnnotationPayload) GetDetail() isAnnotationPayload_Detail {
if m != nil {
return m.Detail
}
return nil
}
func (m *AnnotationPayload) GetTranslation() *TranslationAnnotation {
if x, ok := m.GetDetail().(*AnnotationPayload_Translation); ok {
return x.Translation
}
return nil
}
func (m *AnnotationPayload) GetClassification() *ClassificationAnnotation {
if x, ok := m.GetDetail().(*AnnotationPayload_Classification); ok {
return x.Classification
}
return nil
}
func (m *AnnotationPayload) GetAnnotationSpecId() string {
if m != nil {
return m.AnnotationSpecId
}
return ""
}
func (m *AnnotationPayload) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*AnnotationPayload) 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 _AnnotationPayload_OneofMarshaler, _AnnotationPayload_OneofUnmarshaler, _AnnotationPayload_OneofSizer, []interface{}{
(*AnnotationPayload_Translation)(nil),
(*AnnotationPayload_Classification)(nil),
}
}
func _AnnotationPayload_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*AnnotationPayload)
// detail
switch x := m.Detail.(type) {
case *AnnotationPayload_Translation:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Translation); err != nil {
return err
}
case *AnnotationPayload_Classification:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Classification); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("AnnotationPayload.Detail has unexpected type %T", x)
}
return nil
}
func _AnnotationPayload_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*AnnotationPayload)
switch tag {
case 2: // detail.translation
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TranslationAnnotation)
err := b.DecodeMessage(msg)
m.Detail = &AnnotationPayload_Translation{msg}
return true, err
case 3: // detail.classification
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ClassificationAnnotation)
err := b.DecodeMessage(msg)
m.Detail = &AnnotationPayload_Classification{msg}
return true, err
default:
return false, nil
}
}
func _AnnotationPayload_OneofSizer(msg proto.Message) (n int) {
m := msg.(*AnnotationPayload)
// detail
switch x := m.Detail.(type) {
case *AnnotationPayload_Translation:
s := proto.Size(x.Translation)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *AnnotationPayload_Classification:
s := proto.Size(x.Classification)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*AnnotationPayload)(nil), "google.cloud.automl.v1beta1.AnnotationPayload")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/annotation_payload.proto", fileDescriptor_cb8fb684261d0460)
}
var fileDescriptor_cb8fb684261d0460 = []byte{
// 297 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x41, 0x4b, 0x33, 0x31,
0x10, 0x86, 0xbf, 0xed, 0x87, 0x45, 0x53, 0x11, 0xdd, 0xd3, 0x52, 0x05, 0xab, 0xa7, 0x1e, 0x34,
0xb1, 0x55, 0x4f, 0x9e, 0x5a, 0x2f, 0x7a, 0x91, 0x52, 0xc5, 0x83, 0x97, 0x65, 0x9a, 0xa4, 0x21,
0x90, 0xcd, 0x84, 0x26, 0x15, 0xfa, 0x8b, 0xfc, 0x9b, 0x42, 0xb2, 0xd8, 0xad, 0xc8, 0x1e, 0x93,
0x79, 0x9f, 0x67, 0x26, 0x19, 0x72, 0xa7, 0x10, 0x95, 0x91, 0x8c, 0x1b, 0x5c, 0x0b, 0x06, 0xeb,
0x80, 0x95, 0x61, 0x9f, 0xa3, 0x85, 0x0c, 0x30, 0x62, 0x60, 0x2d, 0x06, 0x08, 0x1a, 0x6d, 0xe9,
0x60, 0x63, 0x10, 0x04, 0x75, 0x2b, 0x0c, 0x98, 0x9f, 0x26, 0x8a, 0x46, 0x8a, 0x26, 0x8a, 0xd6,
0x54, 0xff, 0xac, 0x56, 0x82, 0xd3, 0x0d, 0x83, 0x4f, 0x68, 0xff, 0xa6, 0xad, 0x21, 0x37, 0xe0,
0xbd, 0x5e, 0x6a, 0x1e, 0x91, 0x9a, 0xb8, 0x6e, 0x23, 0xc2, 0x0a, 0xac, 0x37, 0x8d, 0xf8, 0xe5,
0x57, 0x87, 0x9c, 0x4c, 0x7e, 0xda, 0xce, 0xd2, 0xdc, 0xf9, 0x3b, 0xe9, 0x35, 0xa2, 0x45, 0x67,
0x90, 0x0d, 0x7b, 0xe3, 0x31, 0x6d, 0x79, 0x07, 0x7d, 0xdb, 0xe6, 0xb7, 0xbe, 0xa7, 0x7f, 0xf3,
0xa6, 0x28, 0x2f, 0xc9, 0xd1, 0xee, 0xd0, 0xc5, 0xff, 0xa8, 0xbe, 0x6f, 0x55, 0x3f, 0xee, 0x20,
0x3b, 0xf6, 0x5f, 0xba, 0xfc, 0x8a, 0xe4, 0x8d, 0x35, 0x78, 0x27, 0x79, 0xa9, 0x45, 0x91, 0x0d,
0xb2, 0xe1, 0xc1, 0xfc, 0x78, 0x5b, 0x79, 0x75, 0x92, 0x3f, 0x8b, 0xfc, 0x82, 0x1c, 0x0a, 0xed,
0x9d, 0x81, 0x4d, 0x69, 0xa1, 0x92, 0xc5, 0x5e, 0xcc, 0xf5, 0xea, 0xbb, 0x17, 0xa8, 0xe4, 0x74,
0x9f, 0x74, 0x85, 0x0c, 0xa0, 0xcd, 0x74, 0x49, 0xce, 0x39, 0x56, 0x6d, 0x83, 0xce, 0xb2, 0x8f,
0x49, 0x5d, 0x56, 0x68, 0xc0, 0x2a, 0x8a, 0x2b, 0xc5, 0x94, 0xb4, 0xf1, 0xab, 0x59, 0x2a, 0x81,
0xd3, 0xfe, 0xcf, 0xe5, 0x3c, 0xa4, 0xe3, 0xa2, 0x1b, 0xd3, 0xb7, 0xdf, 0x01, 0x00, 0x00, 0xff,
0xff, 0x44, 0x63, 0x2f, 0x26, 0x6c, 0x02, 0x00, 0x00,
}

View file

@ -0,0 +1,443 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/classification.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Type of the classification problem.
type ClassificationType int32
const (
// Should not be used, an un-set enum has this value by default.
ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED ClassificationType = 0
// At most one label is allowed per example.
ClassificationType_MULTICLASS ClassificationType = 1
// Multiple labels are allowed for one example.
ClassificationType_MULTILABEL ClassificationType = 2
)
var ClassificationType_name = map[int32]string{
0: "CLASSIFICATION_TYPE_UNSPECIFIED",
1: "MULTICLASS",
2: "MULTILABEL",
}
var ClassificationType_value = map[string]int32{
"CLASSIFICATION_TYPE_UNSPECIFIED": 0,
"MULTICLASS": 1,
"MULTILABEL": 2,
}
func (x ClassificationType) String() string {
return proto.EnumName(ClassificationType_name, int32(x))
}
func (ClassificationType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{0}
}
// Contains annotation details specific to classification.
type ClassificationAnnotation struct {
// Output only. A confidence estimate between 0.0 and 1.0. A higher value
// means greater confidence that the annotation is positive. If a user
// approves an annotation as negative or positive, the score value remains
// unchanged. If a user creates an annotation, the score is 0 for negative or
// 1 for positive.
Score float32 `protobuf:"fixed32,1,opt,name=score,proto3" json:"score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClassificationAnnotation) Reset() { *m = ClassificationAnnotation{} }
func (m *ClassificationAnnotation) String() string { return proto.CompactTextString(m) }
func (*ClassificationAnnotation) ProtoMessage() {}
func (*ClassificationAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{0}
}
func (m *ClassificationAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClassificationAnnotation.Unmarshal(m, b)
}
func (m *ClassificationAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClassificationAnnotation.Marshal(b, m, deterministic)
}
func (m *ClassificationAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassificationAnnotation.Merge(m, src)
}
func (m *ClassificationAnnotation) XXX_Size() int {
return xxx_messageInfo_ClassificationAnnotation.Size(m)
}
func (m *ClassificationAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_ClassificationAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_ClassificationAnnotation proto.InternalMessageInfo
func (m *ClassificationAnnotation) GetScore() float32 {
if m != nil {
return m.Score
}
return 0
}
// Model evaluation metrics for classification problems.
// Visible only to v1beta1
type ClassificationEvaluationMetrics struct {
// Output only. The Area under precision recall curve metric.
AuPrc float32 `protobuf:"fixed32,1,opt,name=au_prc,json=auPrc,proto3" json:"au_prc,omitempty"`
// Output only. The Area under precision recall curve metric based on priors.
BaseAuPrc float32 `protobuf:"fixed32,2,opt,name=base_au_prc,json=baseAuPrc,proto3" json:"base_au_prc,omitempty"`
// Output only. Metrics that have confidence thresholds.
// Precision-recall curve can be derived from it.
ConfidenceMetricsEntry []*ClassificationEvaluationMetrics_ConfidenceMetricsEntry `protobuf:"bytes,3,rep,name=confidence_metrics_entry,json=confidenceMetricsEntry,proto3" json:"confidence_metrics_entry,omitempty"`
// Output only. Confusion matrix of the evaluation.
// Only set for MULTICLASS classification problems where number
// of labels is no more than 10.
// Only set for model level evaluation, not for evaluation per label.
ConfusionMatrix *ClassificationEvaluationMetrics_ConfusionMatrix `protobuf:"bytes,4,opt,name=confusion_matrix,json=confusionMatrix,proto3" json:"confusion_matrix,omitempty"`
// Output only. The annotation spec ids used for this evaluation.
AnnotationSpecId []string `protobuf:"bytes,5,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClassificationEvaluationMetrics) Reset() { *m = ClassificationEvaluationMetrics{} }
func (m *ClassificationEvaluationMetrics) String() string { return proto.CompactTextString(m) }
func (*ClassificationEvaluationMetrics) ProtoMessage() {}
func (*ClassificationEvaluationMetrics) Descriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{1}
}
func (m *ClassificationEvaluationMetrics) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClassificationEvaluationMetrics.Unmarshal(m, b)
}
func (m *ClassificationEvaluationMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClassificationEvaluationMetrics.Marshal(b, m, deterministic)
}
func (m *ClassificationEvaluationMetrics) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassificationEvaluationMetrics.Merge(m, src)
}
func (m *ClassificationEvaluationMetrics) XXX_Size() int {
return xxx_messageInfo_ClassificationEvaluationMetrics.Size(m)
}
func (m *ClassificationEvaluationMetrics) XXX_DiscardUnknown() {
xxx_messageInfo_ClassificationEvaluationMetrics.DiscardUnknown(m)
}
var xxx_messageInfo_ClassificationEvaluationMetrics proto.InternalMessageInfo
func (m *ClassificationEvaluationMetrics) GetAuPrc() float32 {
if m != nil {
return m.AuPrc
}
return 0
}
func (m *ClassificationEvaluationMetrics) GetBaseAuPrc() float32 {
if m != nil {
return m.BaseAuPrc
}
return 0
}
func (m *ClassificationEvaluationMetrics) GetConfidenceMetricsEntry() []*ClassificationEvaluationMetrics_ConfidenceMetricsEntry {
if m != nil {
return m.ConfidenceMetricsEntry
}
return nil
}
func (m *ClassificationEvaluationMetrics) GetConfusionMatrix() *ClassificationEvaluationMetrics_ConfusionMatrix {
if m != nil {
return m.ConfusionMatrix
}
return nil
}
func (m *ClassificationEvaluationMetrics) GetAnnotationSpecId() []string {
if m != nil {
return m.AnnotationSpecId
}
return nil
}
// Metrics for a single confidence threshold.
type ClassificationEvaluationMetrics_ConfidenceMetricsEntry struct {
// Output only. The confidence threshold value used to compute the metrics.
ConfidenceThreshold float32 `protobuf:"fixed32,1,opt,name=confidence_threshold,json=confidenceThreshold,proto3" json:"confidence_threshold,omitempty"`
// Output only. Recall under the given confidence threshold.
Recall float32 `protobuf:"fixed32,2,opt,name=recall,proto3" json:"recall,omitempty"`
// Output only. Precision under the given confidence threshold.
Precision float32 `protobuf:"fixed32,3,opt,name=precision,proto3" json:"precision,omitempty"`
// Output only. The harmonic mean of recall and precision.
F1Score float32 `protobuf:"fixed32,4,opt,name=f1_score,json=f1Score,proto3" json:"f1_score,omitempty"`
// Output only. The recall when only considering the label that has the
// highest prediction score and not below the confidence threshold for each
// example.
RecallAt1 float32 `protobuf:"fixed32,5,opt,name=recall_at1,json=recallAt1,proto3" json:"recall_at1,omitempty"`
// Output only. The precision when only considering the label that has the
// highest predictionscore and not below the confidence threshold for each
// example.
PrecisionAt1 float32 `protobuf:"fixed32,6,opt,name=precision_at1,json=precisionAt1,proto3" json:"precision_at1,omitempty"`
// Output only. The harmonic mean of [recall_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.recall_at1] and [precision_at1][google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry.precision_at1].
F1ScoreAt1 float32 `protobuf:"fixed32,7,opt,name=f1_score_at1,json=f1ScoreAt1,proto3" json:"f1_score_at1,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Reset() {
*m = ClassificationEvaluationMetrics_ConfidenceMetricsEntry{}
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) String() string {
return proto.CompactTextString(m)
}
func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) ProtoMessage() {}
func (*ClassificationEvaluationMetrics_ConfidenceMetricsEntry) Descriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{1, 0}
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry.Unmarshal(m, b)
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry.Marshal(b, m, deterministic)
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry.Merge(m, src)
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) XXX_Size() int {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry.Size(m)
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) XXX_DiscardUnknown() {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry.DiscardUnknown(m)
}
var xxx_messageInfo_ClassificationEvaluationMetrics_ConfidenceMetricsEntry proto.InternalMessageInfo
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetConfidenceThreshold() float32 {
if m != nil {
return m.ConfidenceThreshold
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetRecall() float32 {
if m != nil {
return m.Recall
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetPrecision() float32 {
if m != nil {
return m.Precision
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetF1Score() float32 {
if m != nil {
return m.F1Score
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetRecallAt1() float32 {
if m != nil {
return m.RecallAt1
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetPrecisionAt1() float32 {
if m != nil {
return m.PrecisionAt1
}
return 0
}
func (m *ClassificationEvaluationMetrics_ConfidenceMetricsEntry) GetF1ScoreAt1() float32 {
if m != nil {
return m.F1ScoreAt1
}
return 0
}
// Confusion matrix of the model running the classification.
type ClassificationEvaluationMetrics_ConfusionMatrix struct {
// Output only. IDs of the annotation specs used in the confusion matrix.
AnnotationSpecId []string `protobuf:"bytes,1,rep,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"`
// Output only. Rows in the confusion matrix. The number of rows is equal to
// the size of `annotation_spec_id`.
// `row[i].value[j]` is the number of examples that have ground truth of the
// `annotation_spec_id[i]` and are predicted as `annotation_spec_id[j]` by
// the model being evaluated.
Row []*ClassificationEvaluationMetrics_ConfusionMatrix_Row `protobuf:"bytes,2,rep,name=row,proto3" json:"row,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) Reset() {
*m = ClassificationEvaluationMetrics_ConfusionMatrix{}
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) String() string {
return proto.CompactTextString(m)
}
func (*ClassificationEvaluationMetrics_ConfusionMatrix) ProtoMessage() {}
func (*ClassificationEvaluationMetrics_ConfusionMatrix) Descriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{1, 1}
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix.Unmarshal(m, b)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix.Marshal(b, m, deterministic)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix.Merge(m, src)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) XXX_Size() int {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix.Size(m)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) XXX_DiscardUnknown() {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix.DiscardUnknown(m)
}
var xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix proto.InternalMessageInfo
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) GetAnnotationSpecId() []string {
if m != nil {
return m.AnnotationSpecId
}
return nil
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix) GetRow() []*ClassificationEvaluationMetrics_ConfusionMatrix_Row {
if m != nil {
return m.Row
}
return nil
}
// Output only. A row in the confusion matrix.
type ClassificationEvaluationMetrics_ConfusionMatrix_Row struct {
// Output only. Value of the specific cell in the confusion matrix.
// The number of values each row is equal to the size of
// annotatin_spec_id.
ExampleCount []int32 `protobuf:"varint,1,rep,packed,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) Reset() {
*m = ClassificationEvaluationMetrics_ConfusionMatrix_Row{}
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) String() string {
return proto.CompactTextString(m)
}
func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) ProtoMessage() {}
func (*ClassificationEvaluationMetrics_ConfusionMatrix_Row) Descriptor() ([]byte, []int) {
return fileDescriptor_7b436fefe6ae5367, []int{1, 1, 0}
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row.Unmarshal(m, b)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row.Marshal(b, m, deterministic)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row.Merge(m, src)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) XXX_Size() int {
return xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row.Size(m)
}
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) XXX_DiscardUnknown() {
xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row.DiscardUnknown(m)
}
var xxx_messageInfo_ClassificationEvaluationMetrics_ConfusionMatrix_Row proto.InternalMessageInfo
func (m *ClassificationEvaluationMetrics_ConfusionMatrix_Row) GetExampleCount() []int32 {
if m != nil {
return m.ExampleCount
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.automl.v1beta1.ClassificationType", ClassificationType_name, ClassificationType_value)
proto.RegisterType((*ClassificationAnnotation)(nil), "google.cloud.automl.v1beta1.ClassificationAnnotation")
proto.RegisterType((*ClassificationEvaluationMetrics)(nil), "google.cloud.automl.v1beta1.ClassificationEvaluationMetrics")
proto.RegisterType((*ClassificationEvaluationMetrics_ConfidenceMetricsEntry)(nil), "google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfidenceMetricsEntry")
proto.RegisterType((*ClassificationEvaluationMetrics_ConfusionMatrix)(nil), "google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix")
proto.RegisterType((*ClassificationEvaluationMetrics_ConfusionMatrix_Row)(nil), "google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix.Row")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/classification.proto", fileDescriptor_7b436fefe6ae5367)
}
var fileDescriptor_7b436fefe6ae5367 = []byte{
// 583 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x4f, 0xdb, 0x3e,
0x14, 0xff, 0xa6, 0xa5, 0xe5, 0xcb, 0x83, 0x8d, 0xca, 0x30, 0x94, 0x75, 0x6c, 0x54, 0x70, 0xa9,
0xd0, 0x94, 0x10, 0x76, 0xdc, 0x29, 0x64, 0x45, 0x8a, 0x54, 0x58, 0x95, 0x94, 0x03, 0xbb, 0x58,
0xae, 0xeb, 0x86, 0x48, 0x69, 0x1c, 0x39, 0x0e, 0x85, 0xeb, 0xee, 0xfb, 0xdb, 0xf6, 0x5f, 0xec,
0xef, 0x98, 0x62, 0x87, 0x74, 0x95, 0x2a, 0x36, 0x69, 0xbb, 0xe5, 0x7d, 0x7e, 0xf9, 0x3d, 0xbf,
0xc8, 0x70, 0x16, 0x71, 0x1e, 0x25, 0xcc, 0xa6, 0x09, 0x2f, 0xa6, 0x36, 0x29, 0x24, 0x9f, 0x27,
0xf6, 0xbd, 0x33, 0x61, 0x92, 0x38, 0x36, 0x4d, 0x48, 0x9e, 0xc7, 0xb3, 0x98, 0x12, 0x19, 0xf3,
0xd4, 0xca, 0x04, 0x97, 0x1c, 0xbd, 0xd1, 0x0e, 0x4b, 0x39, 0x2c, 0xed, 0xb0, 0x2a, 0x47, 0xf7,
0xb0, 0x8a, 0x23, 0x59, 0x6c, 0x93, 0x34, 0xe5, 0x52, 0x39, 0x73, 0x6d, 0x3d, 0x3e, 0x03, 0xd3,
0x5b, 0x89, 0x74, 0x6b, 0x09, 0xda, 0x87, 0x56, 0x4e, 0xb9, 0x60, 0xa6, 0xd1, 0x33, 0xfa, 0x8d,
0x40, 0x17, 0xc7, 0x3f, 0xda, 0x70, 0xb4, 0x6a, 0x19, 0xdc, 0x93, 0xa4, 0x50, 0x5f, 0x57, 0x4c,
0x8a, 0x98, 0xe6, 0xe8, 0x15, 0xb4, 0x49, 0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, 0x47, 0x2c, 0x55, 0x2f, 0x89, 0xad, 0x29, 0x92, 0xc5, 0xf9,
0xda, 0x97, 0xeb, 0xa3, 0x2e, 0x27, 0x6d, 0xa5, 0xfe, 0xf0, 0x33, 0x00, 0x00, 0xff, 0xff, 0x22,
0xd4, 0x8f, 0x68, 0xe6, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,429 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/data_items.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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 representation of an image.
type Image struct {
// Input only. The data representing the image.
// For Predict calls [image_bytes][] must be set, as other options are not
// currently supported by prediction API. You can read the contents of an
// uploaded image by using the [content_uri][] field.
//
// Types that are valid to be assigned to Data:
// *Image_ImageBytes
// *Image_InputConfig
Data isImage_Data `protobuf_oneof:"data"`
// Output only. HTTP URI to the thumbnail image.
ThumbnailUri string `protobuf:"bytes,4,opt,name=thumbnail_uri,json=thumbnailUri,proto3" json:"thumbnail_uri,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Image) Reset() { *m = Image{} }
func (m *Image) String() string { return proto.CompactTextString(m) }
func (*Image) ProtoMessage() {}
func (*Image) Descriptor() ([]byte, []int) {
return fileDescriptor_bd1fd4e23d5f1ca3, []int{0}
}
func (m *Image) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Image.Unmarshal(m, b)
}
func (m *Image) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Image.Marshal(b, m, deterministic)
}
func (m *Image) XXX_Merge(src proto.Message) {
xxx_messageInfo_Image.Merge(m, src)
}
func (m *Image) XXX_Size() int {
return xxx_messageInfo_Image.Size(m)
}
func (m *Image) XXX_DiscardUnknown() {
xxx_messageInfo_Image.DiscardUnknown(m)
}
var xxx_messageInfo_Image proto.InternalMessageInfo
type isImage_Data interface {
isImage_Data()
}
type Image_ImageBytes struct {
ImageBytes []byte `protobuf:"bytes,1,opt,name=image_bytes,json=imageBytes,proto3,oneof"`
}
type Image_InputConfig struct {
InputConfig *InputConfig `protobuf:"bytes,6,opt,name=input_config,json=inputConfig,proto3,oneof"`
}
func (*Image_ImageBytes) isImage_Data() {}
func (*Image_InputConfig) isImage_Data() {}
func (m *Image) GetData() isImage_Data {
if m != nil {
return m.Data
}
return nil
}
func (m *Image) GetImageBytes() []byte {
if x, ok := m.GetData().(*Image_ImageBytes); ok {
return x.ImageBytes
}
return nil
}
func (m *Image) GetInputConfig() *InputConfig {
if x, ok := m.GetData().(*Image_InputConfig); ok {
return x.InputConfig
}
return nil
}
func (m *Image) GetThumbnailUri() string {
if m != nil {
return m.ThumbnailUri
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Image) 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 _Image_OneofMarshaler, _Image_OneofUnmarshaler, _Image_OneofSizer, []interface{}{
(*Image_ImageBytes)(nil),
(*Image_InputConfig)(nil),
}
}
func _Image_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Image)
// data
switch x := m.Data.(type) {
case *Image_ImageBytes:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeRawBytes(x.ImageBytes)
case *Image_InputConfig:
b.EncodeVarint(6<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.InputConfig); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Image.Data has unexpected type %T", x)
}
return nil
}
func _Image_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Image)
switch tag {
case 1: // data.image_bytes
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeRawBytes(true)
m.Data = &Image_ImageBytes{x}
return true, err
case 6: // data.input_config
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(InputConfig)
err := b.DecodeMessage(msg)
m.Data = &Image_InputConfig{msg}
return true, err
default:
return false, nil
}
}
func _Image_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Image)
// data
switch x := m.Data.(type) {
case *Image_ImageBytes:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.ImageBytes)))
n += len(x.ImageBytes)
case *Image_InputConfig:
s := proto.Size(x.InputConfig)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A representation of a text snippet.
type TextSnippet struct {
// Required. The content of the text snippet as a string. Up to 250000
// characters long.
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
// The format of the source text. For example, "text/html" or
// "text/plain". If left blank the format is automatically determined from
// the type of the uploaded content. The default is "text/html". Up to 25000
// characters long.
MimeType string `protobuf:"bytes,2,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// Output only. HTTP URI where you can download the content.
ContentUri string `protobuf:"bytes,4,opt,name=content_uri,json=contentUri,proto3" json:"content_uri,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextSnippet) Reset() { *m = TextSnippet{} }
func (m *TextSnippet) String() string { return proto.CompactTextString(m) }
func (*TextSnippet) ProtoMessage() {}
func (*TextSnippet) Descriptor() ([]byte, []int) {
return fileDescriptor_bd1fd4e23d5f1ca3, []int{1}
}
func (m *TextSnippet) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextSnippet.Unmarshal(m, b)
}
func (m *TextSnippet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextSnippet.Marshal(b, m, deterministic)
}
func (m *TextSnippet) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextSnippet.Merge(m, src)
}
func (m *TextSnippet) XXX_Size() int {
return xxx_messageInfo_TextSnippet.Size(m)
}
func (m *TextSnippet) XXX_DiscardUnknown() {
xxx_messageInfo_TextSnippet.DiscardUnknown(m)
}
var xxx_messageInfo_TextSnippet proto.InternalMessageInfo
func (m *TextSnippet) GetContent() string {
if m != nil {
return m.Content
}
return ""
}
func (m *TextSnippet) GetMimeType() string {
if m != nil {
return m.MimeType
}
return ""
}
func (m *TextSnippet) GetContentUri() string {
if m != nil {
return m.ContentUri
}
return ""
}
// Example data used for training or prediction.
type ExamplePayload struct {
// Required. Input only. The example data.
//
// Types that are valid to be assigned to Payload:
// *ExamplePayload_Image
// *ExamplePayload_TextSnippet
Payload isExamplePayload_Payload `protobuf_oneof:"payload"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExamplePayload) Reset() { *m = ExamplePayload{} }
func (m *ExamplePayload) String() string { return proto.CompactTextString(m) }
func (*ExamplePayload) ProtoMessage() {}
func (*ExamplePayload) Descriptor() ([]byte, []int) {
return fileDescriptor_bd1fd4e23d5f1ca3, []int{2}
}
func (m *ExamplePayload) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExamplePayload.Unmarshal(m, b)
}
func (m *ExamplePayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExamplePayload.Marshal(b, m, deterministic)
}
func (m *ExamplePayload) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExamplePayload.Merge(m, src)
}
func (m *ExamplePayload) XXX_Size() int {
return xxx_messageInfo_ExamplePayload.Size(m)
}
func (m *ExamplePayload) XXX_DiscardUnknown() {
xxx_messageInfo_ExamplePayload.DiscardUnknown(m)
}
var xxx_messageInfo_ExamplePayload proto.InternalMessageInfo
type isExamplePayload_Payload interface {
isExamplePayload_Payload()
}
type ExamplePayload_Image struct {
Image *Image `protobuf:"bytes,1,opt,name=image,proto3,oneof"`
}
type ExamplePayload_TextSnippet struct {
TextSnippet *TextSnippet `protobuf:"bytes,2,opt,name=text_snippet,json=textSnippet,proto3,oneof"`
}
func (*ExamplePayload_Image) isExamplePayload_Payload() {}
func (*ExamplePayload_TextSnippet) isExamplePayload_Payload() {}
func (m *ExamplePayload) GetPayload() isExamplePayload_Payload {
if m != nil {
return m.Payload
}
return nil
}
func (m *ExamplePayload) GetImage() *Image {
if x, ok := m.GetPayload().(*ExamplePayload_Image); ok {
return x.Image
}
return nil
}
func (m *ExamplePayload) GetTextSnippet() *TextSnippet {
if x, ok := m.GetPayload().(*ExamplePayload_TextSnippet); ok {
return x.TextSnippet
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ExamplePayload) 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 _ExamplePayload_OneofMarshaler, _ExamplePayload_OneofUnmarshaler, _ExamplePayload_OneofSizer, []interface{}{
(*ExamplePayload_Image)(nil),
(*ExamplePayload_TextSnippet)(nil),
}
}
func _ExamplePayload_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ExamplePayload)
// payload
switch x := m.Payload.(type) {
case *ExamplePayload_Image:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.Image); err != nil {
return err
}
case *ExamplePayload_TextSnippet:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TextSnippet); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ExamplePayload.Payload has unexpected type %T", x)
}
return nil
}
func _ExamplePayload_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ExamplePayload)
switch tag {
case 1: // payload.image
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(Image)
err := b.DecodeMessage(msg)
m.Payload = &ExamplePayload_Image{msg}
return true, err
case 2: // payload.text_snippet
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TextSnippet)
err := b.DecodeMessage(msg)
m.Payload = &ExamplePayload_TextSnippet{msg}
return true, err
default:
return false, nil
}
}
func _ExamplePayload_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ExamplePayload)
// payload
switch x := m.Payload.(type) {
case *ExamplePayload_Image:
s := proto.Size(x.Image)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *ExamplePayload_TextSnippet:
s := proto.Size(x.TextSnippet)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*Image)(nil), "google.cloud.automl.v1beta1.Image")
proto.RegisterType((*TextSnippet)(nil), "google.cloud.automl.v1beta1.TextSnippet")
proto.RegisterType((*ExamplePayload)(nil), "google.cloud.automl.v1beta1.ExamplePayload")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/data_items.proto", fileDescriptor_bd1fd4e23d5f1ca3)
}
var fileDescriptor_bd1fd4e23d5f1ca3 = []byte{
// 381 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x3d, 0xcf, 0xd3, 0x30,
0x14, 0x85, 0x1b, 0xd4, 0x0f, 0xe2, 0x14, 0x06, 0x4f, 0x51, 0x8b, 0xd4, 0x52, 0x18, 0x32, 0xa0,
0x44, 0x2d, 0x1b, 0x4c, 0x04, 0x21, 0xb5, 0x03, 0x52, 0x15, 0xda, 0x85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f4, 0x06, 0x3f, 0x24, 0xd7, 0x9a, 0x02, 0x0e, 0xd1, 0xac, 0x54, 0x12, 0xa8,
0x04, 0xeb, 0xd4, 0xcf, 0xfe, 0x95, 0x78, 0x89, 0x7c, 0xc1, 0x05, 0xcd, 0xa1, 0xd3, 0x34, 0x7c,
0x61, 0x7b, 0x2f, 0x8d, 0x70, 0xea, 0x34, 0xc5, 0x2b, 0x14, 0xf4, 0xdc, 0xc3, 0x42, 0xd4, 0x4b,
0xe7, 0x9a, 0x9b, 0x3c, 0x5e, 0x7f, 0xbb, 0x11, 0xa1, 0x2b, 0x7a, 0x24, 0x5d, 0xa5, 0xc8, 0x05,
0x7f, 0x42, 0x13, 0x9b, 0x81, 0x5d, 0x14, 0xec, 0x36, 0xc3, 0xd7, 0x35, 0xe4, 0x7e, 0x94, 0xb9,
0x11, 0x93, 0x18, 0xd0, 0x1b, 0xe4, 0x8d, 0xb3, 0x6d, 0xfd, 0x3c, 0x97, 0xd8, 0xc3, 0x35, 0x4d,
0x62, 0x70, 0x2f, 0x53, 0x1f, 0xcd, 0xb4, 0x73, 0x95, 0x5e, 0xd1, 0xaa, 0x54, 0x62, 0xe8, 0xa0,
0xa3, 0xf7, 0xf3, 0x4b, 0xdf, 0x66, 0xaa, 0x22, 0x92, 0xc5, 0xaa, 0x66, 0x09, 0xa3, 0xd2, 0xfe,
0xf9, 0xc4, 0xb5, 0x88, 0xe6, 0xcd, 0x93, 0x4f, 0xe4, 0xb3, 0x2b, 0x8b, 0xa9, 0xa5, 0x3f, 0xfe,
0x0d, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xa5, 0xac, 0xba, 0xb8, 0x02, 0x00, 0x00,
}

View file

@ -0,0 +1,286 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/dataset.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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 workspace for solving a single, particular machine learning (ML) problem.
// A workspace contains examples that may be annotated.
type Dataset struct {
// Required.
// The dataset metadata that is specific to the problem type.
//
// Types that are valid to be assigned to DatasetMetadata:
// *Dataset_TranslationDatasetMetadata
// *Dataset_ImageClassificationDatasetMetadata
// *Dataset_TextClassificationDatasetMetadata
DatasetMetadata isDataset_DatasetMetadata `protobuf_oneof:"dataset_metadata"`
// Output only. The resource name of the dataset.
// Form: `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The name of the dataset to show in the interface. The name can be
// up to 32 characters
// long and can consist only of ASCII Latin letters A-Z and a-z, underscores
// (_), and ASCII digits 0-9.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Output only. The number of examples in the dataset.
ExampleCount int32 `protobuf:"varint,21,opt,name=example_count,json=exampleCount,proto3" json:"example_count,omitempty"`
// Output only. Timestamp when this dataset was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,14,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Dataset) Reset() { *m = Dataset{} }
func (m *Dataset) String() string { return proto.CompactTextString(m) }
func (*Dataset) ProtoMessage() {}
func (*Dataset) Descriptor() ([]byte, []int) {
return fileDescriptor_1f2b1dc66a1e92da, []int{0}
}
func (m *Dataset) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Dataset.Unmarshal(m, b)
}
func (m *Dataset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Dataset.Marshal(b, m, deterministic)
}
func (m *Dataset) XXX_Merge(src proto.Message) {
xxx_messageInfo_Dataset.Merge(m, src)
}
func (m *Dataset) XXX_Size() int {
return xxx_messageInfo_Dataset.Size(m)
}
func (m *Dataset) XXX_DiscardUnknown() {
xxx_messageInfo_Dataset.DiscardUnknown(m)
}
var xxx_messageInfo_Dataset proto.InternalMessageInfo
type isDataset_DatasetMetadata interface {
isDataset_DatasetMetadata()
}
type Dataset_TranslationDatasetMetadata struct {
TranslationDatasetMetadata *TranslationDatasetMetadata `protobuf:"bytes,23,opt,name=translation_dataset_metadata,json=translationDatasetMetadata,proto3,oneof"`
}
type Dataset_ImageClassificationDatasetMetadata struct {
ImageClassificationDatasetMetadata *ImageClassificationDatasetMetadata `protobuf:"bytes,24,opt,name=image_classification_dataset_metadata,json=imageClassificationDatasetMetadata,proto3,oneof"`
}
type Dataset_TextClassificationDatasetMetadata struct {
TextClassificationDatasetMetadata *TextClassificationDatasetMetadata `protobuf:"bytes,25,opt,name=text_classification_dataset_metadata,json=textClassificationDatasetMetadata,proto3,oneof"`
}
func (*Dataset_TranslationDatasetMetadata) isDataset_DatasetMetadata() {}
func (*Dataset_ImageClassificationDatasetMetadata) isDataset_DatasetMetadata() {}
func (*Dataset_TextClassificationDatasetMetadata) isDataset_DatasetMetadata() {}
func (m *Dataset) GetDatasetMetadata() isDataset_DatasetMetadata {
if m != nil {
return m.DatasetMetadata
}
return nil
}
func (m *Dataset) GetTranslationDatasetMetadata() *TranslationDatasetMetadata {
if x, ok := m.GetDatasetMetadata().(*Dataset_TranslationDatasetMetadata); ok {
return x.TranslationDatasetMetadata
}
return nil
}
func (m *Dataset) GetImageClassificationDatasetMetadata() *ImageClassificationDatasetMetadata {
if x, ok := m.GetDatasetMetadata().(*Dataset_ImageClassificationDatasetMetadata); ok {
return x.ImageClassificationDatasetMetadata
}
return nil
}
func (m *Dataset) GetTextClassificationDatasetMetadata() *TextClassificationDatasetMetadata {
if x, ok := m.GetDatasetMetadata().(*Dataset_TextClassificationDatasetMetadata); ok {
return x.TextClassificationDatasetMetadata
}
return nil
}
func (m *Dataset) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Dataset) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *Dataset) GetExampleCount() int32 {
if m != nil {
return m.ExampleCount
}
return 0
}
func (m *Dataset) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Dataset) 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 _Dataset_OneofMarshaler, _Dataset_OneofUnmarshaler, _Dataset_OneofSizer, []interface{}{
(*Dataset_TranslationDatasetMetadata)(nil),
(*Dataset_ImageClassificationDatasetMetadata)(nil),
(*Dataset_TextClassificationDatasetMetadata)(nil),
}
}
func _Dataset_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Dataset)
// dataset_metadata
switch x := m.DatasetMetadata.(type) {
case *Dataset_TranslationDatasetMetadata:
b.EncodeVarint(23<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TranslationDatasetMetadata); err != nil {
return err
}
case *Dataset_ImageClassificationDatasetMetadata:
b.EncodeVarint(24<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ImageClassificationDatasetMetadata); err != nil {
return err
}
case *Dataset_TextClassificationDatasetMetadata:
b.EncodeVarint(25<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TextClassificationDatasetMetadata); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Dataset.DatasetMetadata has unexpected type %T", x)
}
return nil
}
func _Dataset_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Dataset)
switch tag {
case 23: // dataset_metadata.translation_dataset_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TranslationDatasetMetadata)
err := b.DecodeMessage(msg)
m.DatasetMetadata = &Dataset_TranslationDatasetMetadata{msg}
return true, err
case 24: // dataset_metadata.image_classification_dataset_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ImageClassificationDatasetMetadata)
err := b.DecodeMessage(msg)
m.DatasetMetadata = &Dataset_ImageClassificationDatasetMetadata{msg}
return true, err
case 25: // dataset_metadata.text_classification_dataset_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TextClassificationDatasetMetadata)
err := b.DecodeMessage(msg)
m.DatasetMetadata = &Dataset_TextClassificationDatasetMetadata{msg}
return true, err
default:
return false, nil
}
}
func _Dataset_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Dataset)
// dataset_metadata
switch x := m.DatasetMetadata.(type) {
case *Dataset_TranslationDatasetMetadata:
s := proto.Size(x.TranslationDatasetMetadata)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Dataset_ImageClassificationDatasetMetadata:
s := proto.Size(x.ImageClassificationDatasetMetadata)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Dataset_TextClassificationDatasetMetadata:
s := proto.Size(x.TextClassificationDatasetMetadata)
n += 2 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*Dataset)(nil), "google.cloud.automl.v1beta1.Dataset")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/dataset.proto", fileDescriptor_1f2b1dc66a1e92da)
}
var fileDescriptor_1f2b1dc66a1e92da = []byte{
// 428 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x5d, 0x6b, 0x14, 0x31,
0x14, 0x86, 0x1d,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79, 0x9b, 0xda, 0x8d, 0xd3, 0x60, 0x1b, 0xe6, 0xd6, 0x0d, 0x6f, 0xa4, 0x0d, 0xbf, 0xf1,
0xd8, 0x82, 0x56, 0xf9, 0xff, 0x2e, 0xfd, 0x71, 0xbc, 0x2e, 0xae, 0x06, 0xfa, 0xc5, 0xaf, 0x00,
0x00, 0x00, 0xff, 0xff, 0x84, 0x83, 0x13, 0xa3, 0x3c, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,175 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/image.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Dataset metadata that is specific to image classification.
type ImageClassificationDatasetMetadata struct {
// Required.
// Type of the classification problem.
ClassificationType ClassificationType `protobuf:"varint,1,opt,name=classification_type,json=classificationType,proto3,enum=google.cloud.automl.v1beta1.ClassificationType" json:"classification_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImageClassificationDatasetMetadata) Reset() { *m = ImageClassificationDatasetMetadata{} }
func (m *ImageClassificationDatasetMetadata) String() string { return proto.CompactTextString(m) }
func (*ImageClassificationDatasetMetadata) ProtoMessage() {}
func (*ImageClassificationDatasetMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_29b9f2bc900da869, []int{0}
}
func (m *ImageClassificationDatasetMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImageClassificationDatasetMetadata.Unmarshal(m, b)
}
func (m *ImageClassificationDatasetMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImageClassificationDatasetMetadata.Marshal(b, m, deterministic)
}
func (m *ImageClassificationDatasetMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImageClassificationDatasetMetadata.Merge(m, src)
}
func (m *ImageClassificationDatasetMetadata) XXX_Size() int {
return xxx_messageInfo_ImageClassificationDatasetMetadata.Size(m)
}
func (m *ImageClassificationDatasetMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_ImageClassificationDatasetMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_ImageClassificationDatasetMetadata proto.InternalMessageInfo
func (m *ImageClassificationDatasetMetadata) GetClassificationType() ClassificationType {
if m != nil {
return m.ClassificationType
}
return ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED
}
// Model metadata for image classification.
type ImageClassificationModelMetadata struct {
// Optional. The ID of the `base` model. If it is specified, the new model
// will be created based on the `base` model. Otherwise, the new model will be
// created from scratch. The `base` model is expected to be in the same
// `project` and `location` as the new model to create.
BaseModelId string `protobuf:"bytes,1,opt,name=base_model_id,json=baseModelId,proto3" json:"base_model_id,omitempty"`
// Required. The train budget of creating this model. The actual
// `train_cost` will be equal or less than this value.
TrainBudget int64 `protobuf:"varint,2,opt,name=train_budget,json=trainBudget,proto3" json:"train_budget,omitempty"`
// Output only. The actual train cost of creating this model. If this
// model is created from a `base` model, the train cost used to create the
// `base` model are not included.
TrainCost int64 `protobuf:"varint,3,opt,name=train_cost,json=trainCost,proto3" json:"train_cost,omitempty"`
// Output only. The reason that this create model operation stopped,
// e.g. BUDGET_REACHED, CONVERGED.
StopReason string `protobuf:"bytes,5,opt,name=stop_reason,json=stopReason,proto3" json:"stop_reason,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImageClassificationModelMetadata) Reset() { *m = ImageClassificationModelMetadata{} }
func (m *ImageClassificationModelMetadata) String() string { return proto.CompactTextString(m) }
func (*ImageClassificationModelMetadata) ProtoMessage() {}
func (*ImageClassificationModelMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_29b9f2bc900da869, []int{1}
}
func (m *ImageClassificationModelMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImageClassificationModelMetadata.Unmarshal(m, b)
}
func (m *ImageClassificationModelMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImageClassificationModelMetadata.Marshal(b, m, deterministic)
}
func (m *ImageClassificationModelMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImageClassificationModelMetadata.Merge(m, src)
}
func (m *ImageClassificationModelMetadata) XXX_Size() int {
return xxx_messageInfo_ImageClassificationModelMetadata.Size(m)
}
func (m *ImageClassificationModelMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_ImageClassificationModelMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_ImageClassificationModelMetadata proto.InternalMessageInfo
func (m *ImageClassificationModelMetadata) GetBaseModelId() string {
if m != nil {
return m.BaseModelId
}
return ""
}
func (m *ImageClassificationModelMetadata) GetTrainBudget() int64 {
if m != nil {
return m.TrainBudget
}
return 0
}
func (m *ImageClassificationModelMetadata) GetTrainCost() int64 {
if m != nil {
return m.TrainCost
}
return 0
}
func (m *ImageClassificationModelMetadata) GetStopReason() string {
if m != nil {
return m.StopReason
}
return ""
}
func init() {
proto.RegisterType((*ImageClassificationDatasetMetadata)(nil), "google.cloud.automl.v1beta1.ImageClassificationDatasetMetadata")
proto.RegisterType((*ImageClassificationModelMetadata)(nil), "google.cloud.automl.v1beta1.ImageClassificationModelMetadata")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/image.proto", fileDescriptor_29b9f2bc900da869)
}
var fileDescriptor_29b9f2bc900da869 = []byte{
// 338 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00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, 0xc3, 0xe2, 0x07, 0x8b, 0x3f, 0x03, 0x31, 0x3f, 0x51, 0x64, 0x8b, 0xa5, 0xaa, 0xbe,
0x6b, 0xc4, 0xe2, 0x5f, 0x0e, 0x4e, 0x65, 0x75, 0x4f, 0x33, 0x53, 0x72, 0x81, 0x71, 0x3a, 0xe9,
0x21, 0x9b, 0x9b, 0x32, 0xbc, 0x11, 0x7f, 0xa9, 0x05, 0xd3, 0x64, 0x79, 0x57, 0x6a, 0x45, 0xd1,
0xaf, 0x79, 0xb0, 0x18, 0xa5, 0x13, 0x66, 0x2b, 0x46, 0xe1, 0xb5, 0x10, 0x5e, 0x29, 0xd0, 0x51,
0x34, 0x62, 0x61, 0xcc, 0x64, 0x8d, 0x8e, 0xc2, 0x99, 0x98, 0x38, 0x42, 0x9b, 0xb5, 0x0a, 0x1c,
0x36, 0xd1, 0x6f, 0xbe, 0x43, 0xf4, 0x28, 0x65, 0xb2, 0x6a, 0xc5, 0xac, 0xc0, 0xfa, 0xdc, 0xd6,
0x2b, 0xc1, 0xbb, 0xec, 0xfa, 0x7f, 0xbc, 0x0b, 0x5e, 0x9f, 0x06, 0x55, 0x63, 0x05, 0x8d, 0x4e,
0xb0, 0xd5, 0x52, 0xab, 0x86, 0x5f, 0x40, 0xfa, 0x4f, 0x60, 0x8d, 0x3b, 0xf9, 0xae, 0x8f, 0xfe,
0x98, 0xff, 0x61, 0xfb, 0xe1, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xde, 0x9b, 0x5b, 0x1e, 0x68, 0x02,
0x00, 0x00,
}

View file

@ -0,0 +1,377 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/io.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Input configuration.
type InputConfig struct {
// Required. The source of the input.
//
// Types that are valid to be assigned to Source:
// *InputConfig_GcsSource
Source isInputConfig_Source `protobuf_oneof:"source"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *InputConfig) Reset() { *m = InputConfig{} }
func (m *InputConfig) String() string { return proto.CompactTextString(m) }
func (*InputConfig) ProtoMessage() {}
func (*InputConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6e2d768504aa30d7, []int{0}
}
func (m *InputConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputConfig.Unmarshal(m, b)
}
func (m *InputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_InputConfig.Marshal(b, m, deterministic)
}
func (m *InputConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_InputConfig.Merge(m, src)
}
func (m *InputConfig) XXX_Size() int {
return xxx_messageInfo_InputConfig.Size(m)
}
func (m *InputConfig) XXX_DiscardUnknown() {
xxx_messageInfo_InputConfig.DiscardUnknown(m)
}
var xxx_messageInfo_InputConfig proto.InternalMessageInfo
type isInputConfig_Source interface {
isInputConfig_Source()
}
type InputConfig_GcsSource struct {
GcsSource *GcsSource `protobuf:"bytes,1,opt,name=gcs_source,json=gcsSource,proto3,oneof"`
}
func (*InputConfig_GcsSource) isInputConfig_Source() {}
func (m *InputConfig) GetSource() isInputConfig_Source {
if m != nil {
return m.Source
}
return nil
}
func (m *InputConfig) GetGcsSource() *GcsSource {
if x, ok := m.GetSource().(*InputConfig_GcsSource); ok {
return x.GcsSource
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*InputConfig) 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 _InputConfig_OneofMarshaler, _InputConfig_OneofUnmarshaler, _InputConfig_OneofSizer, []interface{}{
(*InputConfig_GcsSource)(nil),
}
}
func _InputConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*InputConfig)
// source
switch x := m.Source.(type) {
case *InputConfig_GcsSource:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GcsSource); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("InputConfig.Source has unexpected type %T", x)
}
return nil
}
func _InputConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*InputConfig)
switch tag {
case 1: // source.gcs_source
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GcsSource)
err := b.DecodeMessage(msg)
m.Source = &InputConfig_GcsSource{msg}
return true, err
default:
return false, nil
}
}
func _InputConfig_OneofSizer(msg proto.Message) (n int) {
m := msg.(*InputConfig)
// source
switch x := m.Source.(type) {
case *InputConfig_GcsSource:
s := proto.Size(x.GcsSource)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Output configuration.
type OutputConfig struct {
// Required. The destination of the output.
//
// Types that are valid to be assigned to Destination:
// *OutputConfig_GcsDestination
Destination isOutputConfig_Destination `protobuf_oneof:"destination"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OutputConfig) Reset() { *m = OutputConfig{} }
func (m *OutputConfig) String() string { return proto.CompactTextString(m) }
func (*OutputConfig) ProtoMessage() {}
func (*OutputConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_6e2d768504aa30d7, []int{1}
}
func (m *OutputConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OutputConfig.Unmarshal(m, b)
}
func (m *OutputConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OutputConfig.Marshal(b, m, deterministic)
}
func (m *OutputConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_OutputConfig.Merge(m, src)
}
func (m *OutputConfig) XXX_Size() int {
return xxx_messageInfo_OutputConfig.Size(m)
}
func (m *OutputConfig) XXX_DiscardUnknown() {
xxx_messageInfo_OutputConfig.DiscardUnknown(m)
}
var xxx_messageInfo_OutputConfig proto.InternalMessageInfo
type isOutputConfig_Destination interface {
isOutputConfig_Destination()
}
type OutputConfig_GcsDestination struct {
GcsDestination *GcsDestination `protobuf:"bytes,1,opt,name=gcs_destination,json=gcsDestination,proto3,oneof"`
}
func (*OutputConfig_GcsDestination) isOutputConfig_Destination() {}
func (m *OutputConfig) GetDestination() isOutputConfig_Destination {
if m != nil {
return m.Destination
}
return nil
}
func (m *OutputConfig) GetGcsDestination() *GcsDestination {
if x, ok := m.GetDestination().(*OutputConfig_GcsDestination); ok {
return x.GcsDestination
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*OutputConfig) 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 _OutputConfig_OneofMarshaler, _OutputConfig_OneofUnmarshaler, _OutputConfig_OneofSizer, []interface{}{
(*OutputConfig_GcsDestination)(nil),
}
}
func _OutputConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*OutputConfig)
// destination
switch x := m.Destination.(type) {
case *OutputConfig_GcsDestination:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.GcsDestination); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("OutputConfig.Destination has unexpected type %T", x)
}
return nil
}
func _OutputConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*OutputConfig)
switch tag {
case 1: // destination.gcs_destination
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(GcsDestination)
err := b.DecodeMessage(msg)
m.Destination = &OutputConfig_GcsDestination{msg}
return true, err
default:
return false, nil
}
}
func _OutputConfig_OneofSizer(msg proto.Message) (n int) {
m := msg.(*OutputConfig)
// destination
switch x := m.Destination.(type) {
case *OutputConfig_GcsDestination:
s := proto.Size(x.GcsDestination)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The GCS location for the input content.
type GcsSource struct {
// Required. Google Cloud Storage URIs to input files, up to 2000 characters
// long. Accepted forms:
// * Full object path: gs://bucket/directory/object.csv
InputUris []string `protobuf:"bytes,1,rep,name=input_uris,json=inputUris,proto3" json:"input_uris,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GcsSource) Reset() { *m = GcsSource{} }
func (m *GcsSource) String() string { return proto.CompactTextString(m) }
func (*GcsSource) ProtoMessage() {}
func (*GcsSource) Descriptor() ([]byte, []int) {
return fileDescriptor_6e2d768504aa30d7, []int{2}
}
func (m *GcsSource) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GcsSource.Unmarshal(m, b)
}
func (m *GcsSource) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GcsSource.Marshal(b, m, deterministic)
}
func (m *GcsSource) XXX_Merge(src proto.Message) {
xxx_messageInfo_GcsSource.Merge(m, src)
}
func (m *GcsSource) XXX_Size() int {
return xxx_messageInfo_GcsSource.Size(m)
}
func (m *GcsSource) XXX_DiscardUnknown() {
xxx_messageInfo_GcsSource.DiscardUnknown(m)
}
var xxx_messageInfo_GcsSource proto.InternalMessageInfo
func (m *GcsSource) GetInputUris() []string {
if m != nil {
return m.InputUris
}
return nil
}
// The GCS location where the output must be written to
type GcsDestination struct {
// Required. Google Cloud Storage URI to output directory, up to 2000
// characters long.
// Accepted forms:
// * Prefix path: gs://bucket/directory
// The requesting user must have write permission to the bucket.
// The directory is created if it doesn't exist.
OutputUriPrefix string `protobuf:"bytes,1,opt,name=output_uri_prefix,json=outputUriPrefix,proto3" json:"output_uri_prefix,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GcsDestination) Reset() { *m = GcsDestination{} }
func (m *GcsDestination) String() string { return proto.CompactTextString(m) }
func (*GcsDestination) ProtoMessage() {}
func (*GcsDestination) Descriptor() ([]byte, []int) {
return fileDescriptor_6e2d768504aa30d7, []int{3}
}
func (m *GcsDestination) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GcsDestination.Unmarshal(m, b)
}
func (m *GcsDestination) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GcsDestination.Marshal(b, m, deterministic)
}
func (m *GcsDestination) XXX_Merge(src proto.Message) {
xxx_messageInfo_GcsDestination.Merge(m, src)
}
func (m *GcsDestination) XXX_Size() int {
return xxx_messageInfo_GcsDestination.Size(m)
}
func (m *GcsDestination) XXX_DiscardUnknown() {
xxx_messageInfo_GcsDestination.DiscardUnknown(m)
}
var xxx_messageInfo_GcsDestination proto.InternalMessageInfo
func (m *GcsDestination) GetOutputUriPrefix() string {
if m != nil {
return m.OutputUriPrefix
}
return ""
}
func init() {
proto.RegisterType((*InputConfig)(nil), "google.cloud.automl.v1beta1.InputConfig")
proto.RegisterType((*OutputConfig)(nil), "google.cloud.automl.v1beta1.OutputConfig")
proto.RegisterType((*GcsSource)(nil), "google.cloud.automl.v1beta1.GcsSource")
proto.RegisterType((*GcsDestination)(nil), "google.cloud.automl.v1beta1.GcsDestination")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/io.proto", fileDescriptor_6e2d768504aa30d7)
}
var fileDescriptor_6e2d768504aa30d7 = []byte{
// 300 bytes of a g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xce, 0xe3, 0x46, 0x32, 0x69, 0x64, 0x6d, 0xb1, 0x35, 0x19,
0x1d, 0x42, 0xeb, 0x97, 0x67, 0x3a, 0x80, 0xf8, 0xa7, 0x5a, 0x72, 0x06, 0x20, 0xab, 0x5f, 0xce,
0x9d, 0x96, 0xa6, 0x1b, 0xf5, 0xf6, 0xfa, 0x71, 0x16, 0xfb, 0xc9, 0x4c, 0x4b, 0x93, 0xde, 0x41,
0x7b, 0xdb, 0x3e, 0x19, 0xc0, 0x11, 0xfa, 0xd2, 0x95, 0x62, 0x5e, 0x6a, 0xbe, 0x92, 0x9f, 0xbe,
0x66, 0x9c, 0x75, 0xc2, 0x62, 0xa6, 0xe5, 0xd4, 0x8f, 0x47, 0x2b, 0x38, 0xcf, 0x71, 0xbd, 0xab,
0xfc, 0x34, 0x7a, 0xbb, 0xaf, 0xd7, 0x02, 0x0b, 0xa6, 0x04, 0x41, 0x2d, 0xa8, 0xe0, 0xca, 0xdf,
0x80, 0x86, 0x15, 0x2b, 0xa5, 0xf9, 0xf3, 0xce, 0xb7, 0xe1, 0xb9, 0x68, 0x7a, 0xfa, 0xe6, 0x2b,
0x00, 0x00, 0xff, 0xff, 0xe3, 0x87, 0x4d, 0x64, 0x14, 0x02, 0x00, 0x00,
}

View file

@ -0,0 +1,348 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/model.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Deployment state of the model.
type Model_DeploymentState int32
const (
// Should not be used, an un-set enum has this value by default.
Model_DEPLOYMENT_STATE_UNSPECIFIED Model_DeploymentState = 0
// Model is deployed.
Model_DEPLOYED Model_DeploymentState = 1
// Model is not deployed.
Model_UNDEPLOYED Model_DeploymentState = 2
)
var Model_DeploymentState_name = map[int32]string{
0: "DEPLOYMENT_STATE_UNSPECIFIED",
1: "DEPLOYED",
2: "UNDEPLOYED",
}
var Model_DeploymentState_value = map[string]int32{
"DEPLOYMENT_STATE_UNSPECIFIED": 0,
"DEPLOYED": 1,
"UNDEPLOYED": 2,
}
func (x Model_DeploymentState) String() string {
return proto.EnumName(Model_DeploymentState_name, int32(x))
}
func (Model_DeploymentState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_27c9ed3a1b40360b, []int{0, 0}
}
// API proto representing a trained machine learning model.
type Model struct {
// Required.
// The model metadata that is specific to the problem type.
// Must match the metadata type of the dataset used to train the model.
//
// Types that are valid to be assigned to ModelMetadata:
// *Model_ImageClassificationModelMetadata
// *Model_TextClassificationModelMetadata
// *Model_TranslationModelMetadata
ModelMetadata isModel_ModelMetadata `protobuf_oneof:"model_metadata"`
// Output only.
// Resource name of the model.
// Format: `projects/{project_id}/locations/{location_id}/models/{model_id}`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The name of the model to show in the interface. The name can be
// up to 32 characters
// long and can consist only of ASCII Latin letters A-Z and a-z, underscores
// (_), and ASCII digits 0-9.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Required.
// The resource ID of the dataset used to create the model. The dataset must
// come from the
// same ancestor project and location.
DatasetId string `protobuf:"bytes,3,opt,name=dataset_id,json=datasetId,proto3" json:"dataset_id,omitempty"`
// Output only.
// Timestamp when this model was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only.
// Timestamp when this model was last updated.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. Deployment state of the model.
DeploymentState Model_DeploymentState `protobuf:"varint,8,opt,name=deployment_state,json=deploymentState,proto3,enum=google.cloud.automl.v1beta1.Model_DeploymentState" json:"deployment_state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Model) Reset() { *m = Model{} }
func (m *Model) String() string { return proto.CompactTextString(m) }
func (*Model) ProtoMessage() {}
func (*Model) Descriptor() ([]byte, []int) {
return fileDescriptor_27c9ed3a1b40360b, []int{0}
}
func (m *Model) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Model.Unmarshal(m, b)
}
func (m *Model) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Model.Marshal(b, m, deterministic)
}
func (m *Model) XXX_Merge(src proto.Message) {
xxx_messageInfo_Model.Merge(m, src)
}
func (m *Model) XXX_Size() int {
return xxx_messageInfo_Model.Size(m)
}
func (m *Model) XXX_DiscardUnknown() {
xxx_messageInfo_Model.DiscardUnknown(m)
}
var xxx_messageInfo_Model proto.InternalMessageInfo
type isModel_ModelMetadata interface {
isModel_ModelMetadata()
}
type Model_ImageClassificationModelMetadata struct {
ImageClassificationModelMetadata *ImageClassificationModelMetadata `protobuf:"bytes,13,opt,name=image_classification_model_metadata,json=imageClassificationModelMetadata,proto3,oneof"`
}
type Model_TextClassificationModelMetadata struct {
TextClassificationModelMetadata *TextClassificationModelMetadata `protobuf:"bytes,14,opt,name=text_classification_model_metadata,json=textClassificationModelMetadata,proto3,oneof"`
}
type Model_TranslationModelMetadata struct {
TranslationModelMetadata *TranslationModelMetadata `protobuf:"bytes,15,opt,name=translation_model_metadata,json=translationModelMetadata,proto3,oneof"`
}
func (*Model_ImageClassificationModelMetadata) isModel_ModelMetadata() {}
func (*Model_TextClassificationModelMetadata) isModel_ModelMetadata() {}
func (*Model_TranslationModelMetadata) isModel_ModelMetadata() {}
func (m *Model) GetModelMetadata() isModel_ModelMetadata {
if m != nil {
return m.ModelMetadata
}
return nil
}
func (m *Model) GetImageClassificationModelMetadata() *ImageClassificationModelMetadata {
if x, ok := m.GetModelMetadata().(*Model_ImageClassificationModelMetadata); ok {
return x.ImageClassificationModelMetadata
}
return nil
}
func (m *Model) GetTextClassificationModelMetadata() *TextClassificationModelMetadata {
if x, ok := m.GetModelMetadata().(*Model_TextClassificationModelMetadata); ok {
return x.TextClassificationModelMetadata
}
return nil
}
func (m *Model) GetTranslationModelMetadata() *TranslationModelMetadata {
if x, ok := m.GetModelMetadata().(*Model_TranslationModelMetadata); ok {
return x.TranslationModelMetadata
}
return nil
}
func (m *Model) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Model) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *Model) GetDatasetId() string {
if m != nil {
return m.DatasetId
}
return ""
}
func (m *Model) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Model) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *Model) GetDeploymentState() Model_DeploymentState {
if m != nil {
return m.DeploymentState
}
return Model_DEPLOYMENT_STATE_UNSPECIFIED
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Model) 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 _Model_OneofMarshaler, _Model_OneofUnmarshaler, _Model_OneofSizer, []interface{}{
(*Model_ImageClassificationModelMetadata)(nil),
(*Model_TextClassificationModelMetadata)(nil),
(*Model_TranslationModelMetadata)(nil),
}
}
func _Model_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Model)
// model_metadata
switch x := m.ModelMetadata.(type) {
case *Model_ImageClassificationModelMetadata:
b.EncodeVarint(13<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ImageClassificationModelMetadata); err != nil {
return err
}
case *Model_TextClassificationModelMetadata:
b.EncodeVarint(14<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TextClassificationModelMetadata); err != nil {
return err
}
case *Model_TranslationModelMetadata:
b.EncodeVarint(15<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TranslationModelMetadata); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Model.ModelMetadata has unexpected type %T", x)
}
return nil
}
func _Model_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Model)
switch tag {
case 13: // model_metadata.image_classification_model_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ImageClassificationModelMetadata)
err := b.DecodeMessage(msg)
m.ModelMetadata = &Model_ImageClassificationModelMetadata{msg}
return true, err
case 14: // model_metadata.text_classification_model_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TextClassificationModelMetadata)
err := b.DecodeMessage(msg)
m.ModelMetadata = &Model_TextClassificationModelMetadata{msg}
return true, err
case 15: // model_metadata.translation_model_metadata
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TranslationModelMetadata)
err := b.DecodeMessage(msg)
m.ModelMetadata = &Model_TranslationModelMetadata{msg}
return true, err
default:
return false, nil
}
}
func _Model_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Model)
// model_metadata
switch x := m.ModelMetadata.(type) {
case *Model_ImageClassificationModelMetadata:
s := proto.Size(x.ImageClassificationModelMetadata)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Model_TextClassificationModelMetadata:
s := proto.Size(x.TextClassificationModelMetadata)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Model_TranslationModelMetadata:
s := proto.Size(x.TranslationModelMetadata)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterEnum("google.cloud.automl.v1beta1.Model_DeploymentState", Model_DeploymentState_name, Model_DeploymentState_value)
proto.RegisterType((*Model)(nil), "google.cloud.automl.v1beta1.Model")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/model.proto", fileDescriptor_27c9ed3a1b40360b)
}
var fileDescriptor_27c9ed3a1b40360b = []byte{
// 501 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xd1, 0x6e, 0xd3, 0x30,
0x14, 0x86, 0x97, 0x01, 0x63, 0x3b, 0x1d, 0x6d, 0xe5, 0xab, 0xa8, 0x0c, 0x35, 0x14, 0x09, 0x7a,
0x43, 0xa2, 0x15, 0x71, 0x35, 0xb8, 0xd8, 0xd6, 0x20, 0x2a, 0xd1, 0x52, 0xda, 0xec, 0x02, 0x24,
0x14, 0xb9, 0x89, 0x1b, 0x59, 0x4a, 0xe2, 0xa8, 0x39, 0x41, 0xdb, 0x33, 0x20, 0xf1, 0x2e, 0xbc,
0x21, 0x8a, 0xed, 0x16, 0x5a, 0x31, 0xf7, 0xae, 0x3e, 0xe7, 0xfb, 0x8f, 0x7f, 0xff, 0x3d, 0x81,
0x57, 0x89, 0x10, 0x49, 0xca, 0xbc, 0x28, 0x15, 0x55, 0xec, 0xd1, 0x0a, 0x45, 0x96, 0x7a, 0x3f,
0xce, 0x17, 0x0c, 0xe9, 0xb9, 0x97, 0x89, 0x98, 0xa5, 0x6e, 0xb1, 0x12, 0x28, 0xc8, 0x53, 0x05,
0xba, 0x12, 0x74, 0x15, 0xe8, 0x6a, 0xb0, 0x73, 0xa6, 0xa7, 0xd0, 0x82, 0x7b, 0x34, 0xcf, 0x05,
0x52, 0xe4, 0x22, 0x2f, 0x95, 0xb4, 0x63, 0xbc, 0x83, 0x67, 0x34, 0x61, 0x1a, 0x7c, 0x69, 0x02,
0x91, 0xdd, 0xa2, 0xe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 0x67, 0xed, 0x7e,
0xbd, 0x2c, 0x6e, 0xb0, 0x5e, 0x96, 0x19, 0x28, 0xbc, 0x2e, 0xd4, 0xe2, 0xaa, 0x88, 0x37, 0xe2,
0xc6, 0x7e, 0xb1, 0xc2, 0xa5, 0xf8, 0x3b, 0xb4, 0x63, 0x56, 0xa4, 0xe2, 0x2e, 0x63, 0x39, 0x86,
0x25, 0x52, 0x64, 0xf6, 0xb1, 0x63, 0xf5, 0x9b, 0x83, 0x81, 0x31, 0x3c, 0x99, 0x8a, 0x3b, 0xdc,
0x48, 0xe7, 0xb5, 0x72, 0xd6, 0x8a, 0xb7, 0x0b, 0xbd, 0x2f, 0xd0, 0xda, 0x61, 0x88, 0x03, 0x67,
0x43, 0x7f, 0xfa, 0xe9, 0xf3, 0xd7, 0xb1, 0x3f, 0x09, 0xc2, 0x79, 0x70, 0x19, 0xf8, 0xe1, 0xcd,
0x64, 0x3e, 0xf5, 0xaf, 0x47, 0x1f, 0x46, 0xfe, 0xb0, 0x7d, 0x40, 0x4e, 0xe1, 0x58, 0x11, 0xfe,
0xb0, 0x6d, 0x91, 0x26, 0xc0, 0xcd, 0x64, 0x73, 0x3e, 0xbc, 0x6a, 0x43, 0x73, 0xfb, 0xcf, 0xbe,
0x5a, 0x42, 0x37, 0x12, 0x99, 0xc9, 0xee, 0xd4, 0xfa, 0x76, 0xa9, 0xdb, 0x89, 0x48, 0x69, 0x9e,
0xb8, 0x62, 0x95, 0x78, 0x09, 0xcb, 0x65, 0x3a, 0x9e, 0x6a, 0xd1, 0x82, 0x97, 0xff, 0xfd, 0x8e,
0x2f, 0xd4, 0x71, 0x71, 0x24, 0xe9, 0x37, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x10, 0xe2,
0xaa, 0xa9, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,255 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/model_evaluation.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Evaluation results of a model.
type ModelEvaluation struct {
// Output only. Problem type specific evaluation metrics.
//
// Types that are valid to be assigned to Metrics:
// *ModelEvaluation_ClassificationEvaluationMetrics
// *ModelEvaluation_TranslationEvaluationMetrics
Metrics isModelEvaluation_Metrics `protobuf_oneof:"metrics"`
// Output only.
// Resource name of the model evaluation.
// Format:
//
// `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only.
// The ID of the annotation spec that the model evaluation applies to. The
// ID is empty for overall model evaluation.
// NOTE: Currently there is no way to obtain the display_name of the
// annotation spec from its ID. To see the display_names, review the model
// evaluations in the UI.
AnnotationSpecId string `protobuf:"bytes,2,opt,name=annotation_spec_id,json=annotationSpecId,proto3" json:"annotation_spec_id,omitempty"`
// Output only.
// Timestamp when this model evaluation was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The number of examples used for model evaluation.
EvaluatedExampleCount int32 `protobuf:"varint,6,opt,name=evaluated_example_count,json=evaluatedExampleCount,proto3" json:"evaluated_example_count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ModelEvaluation) Reset() { *m = ModelEvaluation{} }
func (m *ModelEvaluation) String() string { return proto.CompactTextString(m) }
func (*ModelEvaluation) ProtoMessage() {}
func (*ModelEvaluation) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3cea51cfd5443a, []int{0}
}
func (m *ModelEvaluation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ModelEvaluation.Unmarshal(m, b)
}
func (m *ModelEvaluation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ModelEvaluation.Marshal(b, m, deterministic)
}
func (m *ModelEvaluation) XXX_Merge(src proto.Message) {
xxx_messageInfo_ModelEvaluation.Merge(m, src)
}
func (m *ModelEvaluation) XXX_Size() int {
return xxx_messageInfo_ModelEvaluation.Size(m)
}
func (m *ModelEvaluation) XXX_DiscardUnknown() {
xxx_messageInfo_ModelEvaluation.DiscardUnknown(m)
}
var xxx_messageInfo_ModelEvaluation proto.InternalMessageInfo
type isModelEvaluation_Metrics interface {
isModelEvaluation_Metrics()
}
type ModelEvaluation_ClassificationEvaluationMetrics struct {
ClassificationEvaluationMetrics *ClassificationEvaluationMetrics `protobuf:"bytes,8,opt,name=classification_evaluation_metrics,json=classificationEvaluationMetrics,proto3,oneof"`
}
type ModelEvaluation_TranslationEvaluationMetrics struct {
TranslationEvaluationMetrics *TranslationEvaluationMetrics `protobuf:"bytes,9,opt,name=translation_evaluation_metrics,json=translationEvaluationMetrics,proto3,oneof"`
}
func (*ModelEvaluation_ClassificationEvaluationMetrics) isModelEvaluation_Metrics() {}
func (*ModelEvaluation_TranslationEvaluationMetrics) isModelEvaluation_Metrics() {}
func (m *ModelEvaluation) GetMetrics() isModelEvaluation_Metrics {
if m != nil {
return m.Metrics
}
return nil
}
func (m *ModelEvaluation) GetClassificationEvaluationMetrics() *ClassificationEvaluationMetrics {
if x, ok := m.GetMetrics().(*ModelEvaluation_ClassificationEvaluationMetrics); ok {
return x.ClassificationEvaluationMetrics
}
return nil
}
func (m *ModelEvaluation) GetTranslationEvaluationMetrics() *TranslationEvaluationMetrics {
if x, ok := m.GetMetrics().(*ModelEvaluation_TranslationEvaluationMetrics); ok {
return x.TranslationEvaluationMetrics
}
return nil
}
func (m *ModelEvaluation) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ModelEvaluation) GetAnnotationSpecId() string {
if m != nil {
return m.AnnotationSpecId
}
return ""
}
func (m *ModelEvaluation) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *ModelEvaluation) GetEvaluatedExampleCount() int32 {
if m != nil {
return m.EvaluatedExampleCount
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ModelEvaluation) 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 _ModelEvaluation_OneofMarshaler, _ModelEvaluation_OneofUnmarshaler, _ModelEvaluation_OneofSizer, []interface{}{
(*ModelEvaluation_ClassificationEvaluationMetrics)(nil),
(*ModelEvaluation_TranslationEvaluationMetrics)(nil),
}
}
func _ModelEvaluation_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ModelEvaluation)
// metrics
switch x := m.Metrics.(type) {
case *ModelEvaluation_ClassificationEvaluationMetrics:
b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ClassificationEvaluationMetrics); err != nil {
return err
}
case *ModelEvaluation_TranslationEvaluationMetrics:
b.EncodeVarint(9<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TranslationEvaluationMetrics); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ModelEvaluation.Metrics has unexpected type %T", x)
}
return nil
}
func _ModelEvaluation_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ModelEvaluation)
switch tag {
case 8: // metrics.classification_evaluation_metrics
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ClassificationEvaluationMetrics)
err := b.DecodeMessage(msg)
m.Metrics = &ModelEvaluation_ClassificationEvaluationMetrics{msg}
return true, err
case 9: // metrics.translation_evaluation_metrics
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(TranslationEvaluationMetrics)
err := b.DecodeMessage(msg)
m.Metrics = &ModelEvaluation_TranslationEvaluationMetrics{msg}
return true, err
default:
return false, nil
}
}
func _ModelEvaluation_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ModelEvaluation)
// metrics
switch x := m.Metrics.(type) {
case *ModelEvaluation_ClassificationEvaluationMetrics:
s := proto.Size(x.ClassificationEvaluationMetrics)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *ModelEvaluation_TranslationEvaluationMetrics:
s := proto.Size(x.TranslationEvaluationMetrics)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterType((*ModelEvaluation)(nil), "google.cloud.automl.v1beta1.ModelEvaluation")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/model_evaluation.proto", fileDescriptor_2d3cea51cfd5443a)
}
var fileDescriptor_2d3cea51cfd5443a = []byte{
// 388 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0x4f, 0x6b, 0xdb, 0x30,
0x1c, 0x9d, 0xb7, 0x25, 0x5b, 0x94, 0xc3, 0x86, 0x60, 0xcc, 0x78, 0x61, 0xc9, 0x76, 0xca, 0x61,
0x93, 0x96, 0x0c, 0x06, 0x23, 0xbd, 0x34, 0x21, 0xd0, 0x1e, 0x02, 0xc5, 0xcd, 0xa9, 0x17, 0xa3,
0xc8, 0x8a, 0x11, 0xe8, 0x8f, 0xb1, 0xe4, 0xd0, 0x6b, 0xaf, 0xfd, 0x9c, 0xfd, 0x20, 0xc5, 0x92,
0x13, 0x3b, 0x10, 0x7c, 0xb3, 0xfc, 0xde, 0xfb, 0xfd, 0xde, 0xd3, 0x13, 0x98, 0x67,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 0x3c, 0x0d, 0xdf, 0x3a, 0xc6, 0xe7, 0x06, 0xb9, 0xcf, 0x19,
0xbd, 0x4d, 0xe1, 0x02, 0x0c, 0x69, 0xc1, 0x88, 0x65, 0x49, 0x55, 0x40, 0xd8, 0x73, 0x8e, 0xa3,
0xa3, 0xe3, 0x63, 0x3b, 0x68, 0x7b, 0x6c, 0x27, 0x06, 0x9e, 0x5e, 0xfd, 0x80, 0xff, 0xc0, 0xd7,
0x3a, 0x35, 0x4b, 0x13, 0xf6, 0x48, 0x64, 0x2e, 0x58, 0x42, 0x75, 0xa9, 0x6c, 0xd8, 0x9f, 0x04,
0xd3, 0x5e, 0xfc, 0xe5, 0x04, 0xaf, 0x3d, 0xba, 0xaa, 0xc0, 0xe5, 0x00, 0x7c, 0xa8, 0xaf, 0x68,
0xb9, 0x07, 0x63, 0xaa, 0x65, 0xd7, 0x0d, 0xdd, 0x05, 0x0f, 0xd7, 0x35, 0x9c, 0x69, 0x41, 0x54,
0x86, 0x74, 0x91, 0xe1, 0x8c, 0x29, 0x67, 0x0e, 0x7b, 0x88, 0xe4, 0xdc, 0x5c, 0x7c, 0x7a, 0x0b,
0x7f, 0xdc, 0xf5, 0x1d, 0xfb, 0xef, 0x6b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x78, 0x76, 0xc2,
0x48, 0x03, 0x00, 0x00,
}

View file

@ -0,0 +1,250 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/operations.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// Metadata used across all long running operations returned by AutoML API.
type OperationMetadata struct {
// Ouptut only. Details of specific operation. Even if this field is empty,
// the presence allows to distinguish different types of operations.
//
// Types that are valid to be assigned to Details:
// *OperationMetadata_CreateModelDetails
Details isOperationMetadata_Details `protobuf_oneof:"details"`
// Output only. Progress of operation. Range: [0, 100].
ProgressPercent int32 `protobuf:"varint,13,opt,name=progress_percent,json=progressPercent,proto3" json:"progress_percent,omitempty"`
// Output only. Partial failures encountered.
// E.g. single files that couldn't be read.
// This field should never exceed 20 entries.
// Status details field will contain standard GCP error details.
PartialFailures []*status.Status `protobuf:"bytes,2,rep,name=partial_failures,json=partialFailures,proto3" json:"partial_failures,omitempty"`
// Output only. Time when the operation was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. Time when the operation was updated for the last time.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OperationMetadata) Reset() { *m = OperationMetadata{} }
func (m *OperationMetadata) String() string { return proto.CompactTextString(m) }
func (*OperationMetadata) ProtoMessage() {}
func (*OperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_07afd87baa9bfac3, []int{0}
}
func (m *OperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OperationMetadata.Unmarshal(m, b)
}
func (m *OperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OperationMetadata.Marshal(b, m, deterministic)
}
func (m *OperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_OperationMetadata.Merge(m, src)
}
func (m *OperationMetadata) XXX_Size() int {
return xxx_messageInfo_OperationMetadata.Size(m)
}
func (m *OperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_OperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_OperationMetadata proto.InternalMessageInfo
type isOperationMetadata_Details interface {
isOperationMetadata_Details()
}
type OperationMetadata_CreateModelDetails struct {
CreateModelDetails *CreateModelOperationMetadata `protobuf:"bytes,10,opt,name=create_model_details,json=createModelDetails,proto3,oneof"`
}
func (*OperationMetadata_CreateModelDetails) isOperationMetadata_Details() {}
func (m *OperationMetadata) GetDetails() isOperationMetadata_Details {
if m != nil {
return m.Details
}
return nil
}
func (m *OperationMetadata) GetCreateModelDetails() *CreateModelOperationMetadata {
if x, ok := m.GetDetails().(*OperationMetadata_CreateModelDetails); ok {
return x.CreateModelDetails
}
return nil
}
func (m *OperationMetadata) GetProgressPercent() int32 {
if m != nil {
return m.ProgressPercent
}
return 0
}
func (m *OperationMetadata) GetPartialFailures() []*status.Status {
if m != nil {
return m.PartialFailures
}
return nil
}
func (m *OperationMetadata) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *OperationMetadata) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*OperationMetadata) 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 _OperationMetadata_OneofMarshaler, _OperationMetadata_OneofUnmarshaler, _OperationMetadata_OneofSizer, []interface{}{
(*OperationMetadata_CreateModelDetails)(nil),
}
}
func _OperationMetadata_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*OperationMetadata)
// details
switch x := m.Details.(type) {
case *OperationMetadata_CreateModelDetails:
b.EncodeVarint(10<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.CreateModelDetails); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("OperationMetadata.Details has unexpected type %T", x)
}
return nil
}
func _OperationMetadata_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*OperationMetadata)
switch tag {
case 10: // details.create_model_details
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(CreateModelOperationMetadata)
err := b.DecodeMessage(msg)
m.Details = &OperationMetadata_CreateModelDetails{msg}
return true, err
default:
return false, nil
}
}
func _OperationMetadata_OneofSizer(msg proto.Message) (n int) {
m := msg.(*OperationMetadata)
// details
switch x := m.Details.(type) {
case *OperationMetadata_CreateModelDetails:
s := proto.Size(x.CreateModelDetails)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Details of CreateModel operation.
type CreateModelOperationMetadata struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateModelOperationMetadata) Reset() { *m = CreateModelOperationMetadata{} }
func (m *CreateModelOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*CreateModelOperationMetadata) ProtoMessage() {}
func (*CreateModelOperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_07afd87baa9bfac3, []int{1}
}
func (m *CreateModelOperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateModelOperationMetadata.Unmarshal(m, b)
}
func (m *CreateModelOperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateModelOperationMetadata.Marshal(b, m, deterministic)
}
func (m *CreateModelOperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateModelOperationMetadata.Merge(m, src)
}
func (m *CreateModelOperationMetadata) XXX_Size() int {
return xxx_messageInfo_CreateModelOperationMetadata.Size(m)
}
func (m *CreateModelOperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_CreateModelOperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_CreateModelOperationMetadata proto.InternalMessageInfo
func init() {
proto.RegisterType((*OperationMetadata)(nil), "google.cloud.automl.v1beta1.OperationMetadata")
proto.RegisterType((*CreateModelOperationMetadata)(nil), "google.cloud.automl.v1beta1.CreateModelOperationMetadata")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/operations.proto", fileDescriptor_07afd87baa9bfac3)
}
var fileDescriptor_07afd87baa9bfac3 = []byte{
// 383 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0x4f, 0xab, 0xd3, 0x40,
0x14, 0xc5, 0x6d, 0xeb, 0x1f, 0x9c, 0x22, 0xad, 0x41, 0x30, 0xd4, 0x62, 0x4b, 0x37, 0x56, 0x90,
0x19, 0x5a, 0x57, 0x52, 0x5c, 0x58, 0x45, 0xdc, 0x14, 0x4b, 0x74, 0xe5, 0x26, 0xdc, 0x26, 0xb7,
0x21, 0x30, 0xc9, 0x0c, 0x33, 0x37, 0x05, 0x3f, 0xb6, 0xdf, 0x40, 0x32, 0x33, 0xd1, 0xc7, 0x7b,
0x8f, 0x74, 0x39, 0xf7, 0xfc, 0xce, 0xcd, 0xb9, 0x87, 0xb0, 0x77, 0x85, 0x52, 0x85, 0x44, 0x91,
0x49, 0xd5, 0xe4, 0x02, 0x1a, 0x52, 0x95, 0x14, 0x97, 0xcd, 0x09, 0x09, 0x36, 0x42, 0x69, 0x34,
0x40, 0xa5, 0xaa, 0x2d, 0xd7, 0x46, 0x91, 0x8a, 0x5e, 0x79, 0x9a, 0x3b, 0x9a, 0x7b, 0x9a, 0x07,
0x7a, 0x36, 0x0f, 0xab, 0x40, 0x97, 0x02, 0xea, 0x5a, 0xd1, 0x4d, 0xeb, 0xec, 0x4d, 0xdf, 0x87,
0x2a, 0x95, 0xa3, 0x0c, 0xe0, 0xf6, 0x2a, 0x98, 0xe2, 0x05, 0x64, 0xe3, 0xb6, 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ae, 0x5e, 0xb3, 0x79, 0x5f, 0x49, 0xfb, 0x33, 0x5b, 0x64, 0xaa,
0xea, 0x2b, 0xf9, 0x38, 0xf8, 0xf5, 0x29, 0xc8, 0x85, 0x92, 0x50, 0x17, 0x5c, 0x99, 0x42, 0x14,
0x58, 0xbb, 0x10, 0xc2, 0x4b, 0xa0, 0x4b, 0x7b, 0xef, 0x2f, 0xb6, 0xf3, 0xcf, 0xd3, 0x63, 0x47,
0xbf, 0xff, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xa3, 0x7b, 0xa7, 0x51, 0x21, 0x03, 0x00, 0x00,
}

View file

@ -0,0 +1,268 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/prediction_service.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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
// Request message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
type PredictRequest struct {
// Name of the model requested to serve the prediction.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required.
// Payload to perform a prediction on. The payload must match the
// problem type that the model was trained to solve.
Payload *ExamplePayload `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
// Additional domain-specific parameters, any string must be up to 25000
// characters long.
//
// * For Image Classification:
//
// `score_threshold` - (float) A value from 0.0 to 1.0. When the model
// makes predictions for an
// image, it will only produce results that have at least this confidence
// score threshold. The default is 0.5.
Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PredictRequest) Reset() { *m = PredictRequest{} }
func (m *PredictRequest) String() string { return proto.CompactTextString(m) }
func (*PredictRequest) ProtoMessage() {}
func (*PredictRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_59a9dba5da3c687d, []int{0}
}
func (m *PredictRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PredictRequest.Unmarshal(m, b)
}
func (m *PredictRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PredictRequest.Marshal(b, m, deterministic)
}
func (m *PredictRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PredictRequest.Merge(m, src)
}
func (m *PredictRequest) XXX_Size() int {
return xxx_messageInfo_PredictRequest.Size(m)
}
func (m *PredictRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PredictRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PredictRequest proto.InternalMessageInfo
func (m *PredictRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *PredictRequest) GetPayload() *ExamplePayload {
if m != nil {
return m.Payload
}
return nil
}
func (m *PredictRequest) GetParams() map[string]string {
if m != nil {
return m.Params
}
return nil
}
// Response message for [PredictionService.Predict][google.cloud.automl.v1beta1.PredictionService.Predict].
//
// Currently, this is only
// used to return an image recognition prediction result. More prediction
// output metadata might be introduced in the future.
type PredictResponse struct {
// Prediction result.
Payload []*AnnotationPayload `protobuf:"bytes,1,rep,name=payload,proto3" json:"payload,omitempty"`
// Additional domain-specific prediction response metadata.
Metadata map[string]string `protobuf:"bytes,2,rep,name=metadata,proto3" json:"metadata,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PredictResponse) Reset() { *m = PredictResponse{} }
func (m *PredictResponse) String() string { return proto.CompactTextString(m) }
func (*PredictResponse) ProtoMessage() {}
func (*PredictResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_59a9dba5da3c687d, []int{1}
}
func (m *PredictResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PredictResponse.Unmarshal(m, b)
}
func (m *PredictResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PredictResponse.Marshal(b, m, deterministic)
}
func (m *PredictResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_PredictResponse.Merge(m, src)
}
func (m *PredictResponse) XXX_Size() int {
return xxx_messageInfo_PredictResponse.Size(m)
}
func (m *PredictResponse) XXX_DiscardUnknown() {
xxx_messageInfo_PredictResponse.DiscardUnknown(m)
}
var xxx_messageInfo_PredictResponse proto.InternalMessageInfo
func (m *PredictResponse) GetPayload() []*AnnotationPayload {
if m != nil {
return m.Payload
}
return nil
}
func (m *PredictResponse) GetMetadata() map[string]string {
if m != nil {
return m.Metadata
}
return nil
}
func init() {
proto.RegisterType((*PredictRequest)(nil), "google.cloud.automl.v1beta1.PredictRequest")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.automl.v1beta1.PredictRequest.ParamsEntry")
proto.RegisterType((*PredictResponse)(nil), "google.cloud.automl.v1beta1.PredictResponse")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.automl.v1beta1.PredictResponse.MetadataEntry")
}
// 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
// PredictionServiceClient is the client API for PredictionService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type PredictionServiceClient interface {
// Perform a prediction.
Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error)
}
type predictionServiceClient struct {
cc *grpc.ClientConn
}
func NewPredictionServiceClient(cc *grpc.ClientConn) PredictionServiceClient {
return &predictionServiceClient{cc}
}
func (c *predictionServiceClient) Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*PredictResponse, error) {
out := new(PredictResponse)
err := c.cc.Invoke(ctx, "/google.cloud.automl.v1beta1.PredictionService/Predict", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// PredictionServiceServer is the server API for PredictionService service.
type PredictionServiceServer interface {
// Perform a prediction.
Predict(context.Context, *PredictRequest) (*PredictResponse, error)
}
func RegisterPredictionServiceServer(s *grpc.Server, srv PredictionServiceServer) {
s.RegisterService(&_PredictionService_serviceDesc, srv)
}
func _PredictionService_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.(PredictionServiceServer).Predict(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.automl.v1beta1.PredictionService/Predict",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(PredictionServiceServer).Predict(ctx, req.(*PredictRequest))
}
return interceptor(ctx, in, info, handler)
}
var _PredictionService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.automl.v1beta1.PredictionService",
HandlerType: (*PredictionServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Predict",
Handler: _PredictionService_Predict_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/automl/v1beta1/prediction_service.proto",
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/prediction_service.proto", fileDescriptor_59a9dba5da3c687d)
}
var fileDescriptor_59a9dba5da3c687d = []byte{
// 462 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x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0xeb, 0x99, 0x2e, 0xd5, 0x5b, 0x8c, 0xad, 0x11, 0x53, 0x21,
0x55, 0xec, 0x06, 0x40, 0x4c, 0x45, 0xae, 0x12, 0x94, 0x46, 0x4c, 0x3f, 0xcd, 0xfd, 0x68, 0xcd,
0xc9, 0x74, 0xf1, 0x99, 0x3e, 0x88, 0x55, 0xde, 0x55, 0x76, 0x71, 0xf7, 0x42, 0xc0, 0xb0, 0x6e,
0xf4, 0x90, 0xbc, 0x39, 0xf1, 0x58, 0xaa, 0x24, 0x14, 0x29, 0x57, 0x65, 0x2a, 0x52, 0x2c, 0x9a,
0x31, 0x10, 0xee, 0x08, 0x74, 0x66, 0xfe, 0x3b, 0x37, 0xc7, 0x6e, 0x79, 0xba, 0xd3, 0xdc, 0x7e,
0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xb3, 0x24, 0x52, 0x0b, 0x04, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,124 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/text.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Dataset metadata for classification.
type TextClassificationDatasetMetadata struct {
// Required.
// Type of the classification problem.
ClassificationType ClassificationType `protobuf:"varint,1,opt,name=classification_type,json=classificationType,proto3,enum=google.cloud.automl.v1beta1.ClassificationType" json:"classification_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextClassificationDatasetMetadata) Reset() { *m = TextClassificationDatasetMetadata{} }
func (m *TextClassificationDatasetMetadata) String() string { return proto.CompactTextString(m) }
func (*TextClassificationDatasetMetadata) ProtoMessage() {}
func (*TextClassificationDatasetMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_c1121cf231f416fd, []int{0}
}
func (m *TextClassificationDatasetMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextClassificationDatasetMetadata.Unmarshal(m, b)
}
func (m *TextClassificationDatasetMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextClassificationDatasetMetadata.Marshal(b, m, deterministic)
}
func (m *TextClassificationDatasetMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextClassificationDatasetMetadata.Merge(m, src)
}
func (m *TextClassificationDatasetMetadata) XXX_Size() int {
return xxx_messageInfo_TextClassificationDatasetMetadata.Size(m)
}
func (m *TextClassificationDatasetMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_TextClassificationDatasetMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_TextClassificationDatasetMetadata proto.InternalMessageInfo
func (m *TextClassificationDatasetMetadata) GetClassificationType() ClassificationType {
if m != nil {
return m.ClassificationType
}
return ClassificationType_CLASSIFICATION_TYPE_UNSPECIFIED
}
// Model metadata that is specific to text classification.
type TextClassificationModelMetadata struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextClassificationModelMetadata) Reset() { *m = TextClassificationModelMetadata{} }
func (m *TextClassificationModelMetadata) String() string { return proto.CompactTextString(m) }
func (*TextClassificationModelMetadata) ProtoMessage() {}
func (*TextClassificationModelMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_c1121cf231f416fd, []int{1}
}
func (m *TextClassificationModelMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextClassificationModelMetadata.Unmarshal(m, b)
}
func (m *TextClassificationModelMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextClassificationModelMetadata.Marshal(b, m, deterministic)
}
func (m *TextClassificationModelMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextClassificationModelMetadata.Merge(m, src)
}
func (m *TextClassificationModelMetadata) XXX_Size() int {
return xxx_messageInfo_TextClassificationModelMetadata.Size(m)
}
func (m *TextClassificationModelMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_TextClassificationModelMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_TextClassificationModelMetadata proto.InternalMessageInfo
func init() {
proto.RegisterType((*TextClassificationDatasetMetadata)(nil), "google.cloud.automl.v1beta1.TextClassificationDatasetMetadata")
proto.RegisterType((*TextClassificationModelMetadata)(nil), "google.cloud.automl.v1beta1.TextClassificationModelMetadata")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/text.proto", fileDescriptor_c1121cf231f416fd)
}
var fileDescriptor_c1121cf231f416fd = []byte{
// 240 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0x31, 0x4f, 0x03, 0x31,
0x0c, 0x85, 0x75, 0x0b, 0x12, 0x19, 0x18, 0x8e, 0x05, 0x15, 0xa4, 0xd2, 0x0e, 0x88, 0x29, 0xa6,
0x30, 0x32, 0x51, 0x58, 0x2b, 0x55, 0xa8, 0x13, 0x0b, 0xb8, 0x39, 0x13, 0x45, 0x4a, 0xe3, 0xd0,
0xb8, 0xa8, 0xfd, 0x01, 0xfc, 0x6f, 0xd4, 0xe4, 0x18, 0x4e, 0x87, 0x6e, 0x4c, 0xfc, 0xbd, 0xe7,
0xf7, 0xac, 0x6e, 0x2c, 0xb3, 0xf5, 0x04, 0xc6, 0xf3, 0xae, 0x01, 0xdc, 0x09, 0x6f, 0x3c, 0x7c,
0xcf, 0xd6, 0x24, 0x38, 0x03, 0xa1, 0xbd, 0xe8, 0xb8, 0x65, 0xe1, 0xfa, 0xb2, 0x70, 0x3a, 0x73,
0xba, 0x70, 0xba, 0xe5, 0x46, 0x57, 0xad, 0x09, 0x46, 0x07, 0x18, 0x02, 0x0b, 0x8a, 0xe3, 0x90,
0x8a, 0x74, 0x74, 0x37, 0xb4, 0xc2, 0x78, 0x4c, 0xc9, 0x7d, 0x3a, 0x93, 0x25, 0x45, 0x31, 0xfd,
0xa9, 0xd4, 0x64, 0x45, 0x7b, 0x79, 0xee, 0x0c, 0x5f, 0x50, 0x30, 0x91, 0x2c, 0x48, 0xb0, 0x41,
0xc1, 0xfa, 0x43, 0x9d, 0x77, 0xd5, 0xef, 0x72, 0x88, 0x74, 0x51, 0x5d, 0x57, 0xb7, 0x67, 0xf7,
0xa0, 0x07, 0x02, 0xeb, 0xae, 0xf1, 0xea, 0x10, 0xe9, 0xb5, 0x36, 0xbd, 0xbf, 0xe9, 0x44, 0x8d,
0xfb, 0x31, 0x16, 0xdc, 0x90, 0xff, 0x0b, 0x31, 0xff, 0x52, 0x63, 0xc3, 0x9b, 0xa1, 0x65, 0xf3,
0xd3, 0xa3, 0xc7, 0xf2, 0x58, 0x6c, 0x59, 0xbd, 0x3d, 0xb5, 0xa4, 0x65, 0x8f, 0xc1, 0x6a, 0xde,
0x5a, 0xb0, 0x14, 0x72, 0x6d, 0x28, 0x23, 0x8c, 0x2e, 0xfd, 0x7b, 0xab, 0xc7, 0xf2, 0x5c, 0x9f,
0x64, 0xfa, 0xe1, 0x37, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x8d, 0x0f, 0x20, 0xbb, 0x01, 0x00, 0x00,
}

View file

@ -0,0 +1,266 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/automl/v1beta1/translation.proto
package automl
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Dataset metadata that is specific to translation.
type TranslationDatasetMetadata struct {
// Required. The BCP-47 language code of the source language.
SourceLanguageCode string `protobuf:"bytes,1,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
// Required. The BCP-47 language code of the target language.
TargetLanguageCode string `protobuf:"bytes,2,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TranslationDatasetMetadata) Reset() { *m = TranslationDatasetMetadata{} }
func (m *TranslationDatasetMetadata) String() string { return proto.CompactTextString(m) }
func (*TranslationDatasetMetadata) ProtoMessage() {}
func (*TranslationDatasetMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_74f6484316c15700, []int{0}
}
func (m *TranslationDatasetMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TranslationDatasetMetadata.Unmarshal(m, b)
}
func (m *TranslationDatasetMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TranslationDatasetMetadata.Marshal(b, m, deterministic)
}
func (m *TranslationDatasetMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_TranslationDatasetMetadata.Merge(m, src)
}
func (m *TranslationDatasetMetadata) XXX_Size() int {
return xxx_messageInfo_TranslationDatasetMetadata.Size(m)
}
func (m *TranslationDatasetMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_TranslationDatasetMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_TranslationDatasetMetadata proto.InternalMessageInfo
func (m *TranslationDatasetMetadata) GetSourceLanguageCode() string {
if m != nil {
return m.SourceLanguageCode
}
return ""
}
func (m *TranslationDatasetMetadata) GetTargetLanguageCode() string {
if m != nil {
return m.TargetLanguageCode
}
return ""
}
// Evaluation metrics for the dataset.
type TranslationEvaluationMetrics struct {
// Output only. BLEU score.
BleuScore float64 `protobuf:"fixed64,1,opt,name=bleu_score,json=bleuScore,proto3" json:"bleu_score,omitempty"`
// Output only. BLEU score for base model.
BaseBleuScore float64 `protobuf:"fixed64,2,opt,name=base_bleu_score,json=baseBleuScore,proto3" json:"base_bleu_score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TranslationEvaluationMetrics) Reset() { *m = TranslationEvaluationMetrics{} }
func (m *TranslationEvaluationMetrics) String() string { return proto.CompactTextString(m) }
func (*TranslationEvaluationMetrics) ProtoMessage() {}
func (*TranslationEvaluationMetrics) Descriptor() ([]byte, []int) {
return fileDescriptor_74f6484316c15700, []int{1}
}
func (m *TranslationEvaluationMetrics) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TranslationEvaluationMetrics.Unmarshal(m, b)
}
func (m *TranslationEvaluationMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TranslationEvaluationMetrics.Marshal(b, m, deterministic)
}
func (m *TranslationEvaluationMetrics) XXX_Merge(src proto.Message) {
xxx_messageInfo_TranslationEvaluationMetrics.Merge(m, src)
}
func (m *TranslationEvaluationMetrics) XXX_Size() int {
return xxx_messageInfo_TranslationEvaluationMetrics.Size(m)
}
func (m *TranslationEvaluationMetrics) XXX_DiscardUnknown() {
xxx_messageInfo_TranslationEvaluationMetrics.DiscardUnknown(m)
}
var xxx_messageInfo_TranslationEvaluationMetrics proto.InternalMessageInfo
func (m *TranslationEvaluationMetrics) GetBleuScore() float64 {
if m != nil {
return m.BleuScore
}
return 0
}
func (m *TranslationEvaluationMetrics) GetBaseBleuScore() float64 {
if m != nil {
return m.BaseBleuScore
}
return 0
}
// Model metadata that is specific to translation.
type TranslationModelMetadata struct {
// The resource name of the model to use as a baseline to train the custom
// model. If unset, we use the default base model provided by Google
// Translate. Format:
// `projects/{project_id}/locations/{location_id}/models/{model_id}`
BaseModel string `protobuf:"bytes,1,opt,name=base_model,json=baseModel,proto3" json:"base_model,omitempty"`
// Output only. Inferred from the dataset.
// The source languge (The BCP-47 language code) that is used for training.
SourceLanguageCode string `protobuf:"bytes,2,opt,name=source_language_code,json=sourceLanguageCode,proto3" json:"source_language_code,omitempty"`
// Output only. The target languge (The BCP-47 language code) that is used for
// training.
TargetLanguageCode string `protobuf:"bytes,3,opt,name=target_language_code,json=targetLanguageCode,proto3" json:"target_language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TranslationModelMetadata) Reset() { *m = TranslationModelMetadata{} }
func (m *TranslationModelMetadata) String() string { return proto.CompactTextString(m) }
func (*TranslationModelMetadata) ProtoMessage() {}
func (*TranslationModelMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_74f6484316c15700, []int{2}
}
func (m *TranslationModelMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TranslationModelMetadata.Unmarshal(m, b)
}
func (m *TranslationModelMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TranslationModelMetadata.Marshal(b, m, deterministic)
}
func (m *TranslationModelMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_TranslationModelMetadata.Merge(m, src)
}
func (m *TranslationModelMetadata) XXX_Size() int {
return xxx_messageInfo_TranslationModelMetadata.Size(m)
}
func (m *TranslationModelMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_TranslationModelMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_TranslationModelMetadata proto.InternalMessageInfo
func (m *TranslationModelMetadata) GetBaseModel() string {
if m != nil {
return m.BaseModel
}
return ""
}
func (m *TranslationModelMetadata) GetSourceLanguageCode() string {
if m != nil {
return m.SourceLanguageCode
}
return ""
}
func (m *TranslationModelMetadata) GetTargetLanguageCode() string {
if m != nil {
return m.TargetLanguageCode
}
return ""
}
// Annotation details specific to translation.
type TranslationAnnotation struct {
// Output only . The translated content.
TranslatedContent *TextSnippet `protobuf:"bytes,1,opt,name=translated_content,json=translatedContent,proto3" json:"translated_content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TranslationAnnotation) Reset() { *m = TranslationAnnotation{} }
func (m *TranslationAnnotation) String() string { return proto.CompactTextString(m) }
func (*TranslationAnnotation) ProtoMessage() {}
func (*TranslationAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_74f6484316c15700, []int{3}
}
func (m *TranslationAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TranslationAnnotation.Unmarshal(m, b)
}
func (m *TranslationAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TranslationAnnotation.Marshal(b, m, deterministic)
}
func (m *TranslationAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_TranslationAnnotation.Merge(m, src)
}
func (m *TranslationAnnotation) XXX_Size() int {
return xxx_messageInfo_TranslationAnnotation.Size(m)
}
func (m *TranslationAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_TranslationAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_TranslationAnnotation proto.InternalMessageInfo
func (m *TranslationAnnotation) GetTranslatedContent() *TextSnippet {
if m != nil {
return m.TranslatedContent
}
return nil
}
func init() {
proto.RegisterType((*TranslationDatasetMetadata)(nil), "google.cloud.automl.v1beta1.TranslationDatasetMetadata")
proto.RegisterType((*TranslationEvaluationMetrics)(nil), "google.cloud.automl.v1beta1.TranslationEvaluationMetrics")
proto.RegisterType((*TranslationModelMetadata)(nil), "google.cloud.automl.v1beta1.TranslationModelMetadata")
proto.RegisterType((*TranslationAnnotation)(nil), "google.cloud.automl.v1beta1.TranslationAnnotation")
}
func init() {
proto.RegisterFile("google/cloud/automl/v1beta1/translation.proto", fileDescriptor_74f6484316c15700)
}
var fileDescriptor_74f6484316c15700 = []byte{
// 377 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xcf, 0x6a, 0xdb, 0x40,
0x10, 0xc6, 0x91, 0x0b, 0x05, 0x6f, 0x29, 0x6d, 0x45, 0x0b, 0xc6, 0x75, 0x69, 0xf1, 0xa1, 0xf8,
0xd0, 0x4a, 0x75, 0x73, 0xcc, 0xc9, 0x76, 0x72, 0x8b, 0xc1, 0xd8, 0x86, 0x40, 0x2e, 0x62, 0x24,
0x0d, 0x8b, 0x60, 0xb5, 0x23, 0xb4, 0x23, 0xe3, 0x63, 0x5e, 0x24, 0xef, 0x1a, 0x76, 0x57, 0xb6,
0x45, 0x88, 0x0d, 0xb9, 0x49, 0x33, 0xbf, 0x6f, 0xfe, 0xed, 0x27, 0xfe, 0x4a, 0x22, 0xa9, 0x30,
0xce, 0x14, 0x35, 0x79, 0x0c, 0x0d, 0x53, 0xa9, 0xe2, 0xdd, 0x34, 0x45, 0x86, 0x69, 0xcc, 0x35,
0x68, 0xa3, 0x80, 0x0b, 0xd2, 0x51, 0x55, 0x13, 0x53, 0xf8, 0xdd, 0xe3, 0x91, 0xc3, 0x23, 0x8f,
0x47, 0x2d, 0x3e, 0x1c, 0xb5, 0xb5, 0xa0, 0x2a, 0x62, 0xd0, 0x9a, 0xd8, 0x29, 0x8d, 0x97, 0x0e,
0xff, 0x5c, 0xea, 0x94, 0x03, 0x43, 0x52, 0x30, 0x96, 0x2d, 0x3d, 0x7e, 0x0c, 0xc4, 0x70, 0x7b,
0x6a, 0x7f, 0x03, 0x0c, 0x06, 0x79, 0x89, 0x0c, 0x16, 0x0d, 0xff, 0x89, 0xaf, 0x86, 0x9a, 0x3a,
0xc3, 0x44, 0x81, 0x96, 0x0d, 0x48, 0x4c, 0x32, 0xca, 0x71, 0x10, 0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, 0x77, 0xed, 0x7f, 0xd3, 0xf7, 0x8e, 0xbe, 0x7a, 0x0e, 0x00, 0x00, 0xff,
0xff, 0xfb, 0xc7, 0xb3, 0x37, 0x16, 0x03, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,616 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/bigquery/datatransfer/v1/transfer.proto
package datatransfer
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// DEPRECATED. Represents data transfer type.
type TransferType int32
const (
// Invalid or Unknown transfer type placeholder.
TransferType_TRANSFER_TYPE_UNSPECIFIED TransferType = 0
// Batch data transfer.
TransferType_BATCH TransferType = 1
// Streaming data transfer. Streaming data source currently doesn't
// support multiple transfer configs per project.
TransferType_STREAMING TransferType = 2
)
var TransferType_name = map[int32]string{
0: "TRANSFER_TYPE_UNSPECIFIED",
1: "BATCH",
2: "STREAMING",
}
var TransferType_value = map[string]int32{
"TRANSFER_TYPE_UNSPECIFIED": 0,
"BATCH": 1,
"STREAMING": 2,
}
func (x TransferType) String() string {
return proto.EnumName(TransferType_name, int32(x))
}
func (TransferType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{0}
}
// Represents data transfer run state.
type TransferState int32
const (
// State placeholder.
TransferState_TRANSFER_STATE_UNSPECIFIED TransferState = 0
// Data transfer is scheduled and is waiting to be picked up by
// data transfer backend.
TransferState_PENDING TransferState = 2
// Data transfer is in progress.
TransferState_RUNNING TransferState = 3
// Data transfer completed successsfully.
TransferState_SUCCEEDED TransferState = 4
// Data transfer failed.
TransferState_FAILED TransferState = 5
// Data transfer is cancelled.
TransferState_CANCELLED TransferState = 6
)
var TransferState_name = map[int32]string{
0: "TRANSFER_STATE_UNSPECIFIED",
2: "PENDING",
3: "RUNNING",
4: "SUCCEEDED",
5: "FAILED",
6: "CANCELLED",
}
var TransferState_value = map[string]int32{
"TRANSFER_STATE_UNSPECIFIED": 0,
"PENDING": 2,
"RUNNING": 3,
"SUCCEEDED": 4,
"FAILED": 5,
"CANCELLED": 6,
}
func (x TransferState) String() string {
return proto.EnumName(TransferState_name, int32(x))
}
func (TransferState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{1}
}
// Represents data transfer user facing message severity.
type TransferMessage_MessageSeverity int32
const (
// No severity specified.
TransferMessage_MESSAGE_SEVERITY_UNSPECIFIED TransferMessage_MessageSeverity = 0
// Informational message.
TransferMessage_INFO TransferMessage_MessageSeverity = 1
// Warning message.
TransferMessage_WARNING TransferMessage_MessageSeverity = 2
// Error message.
TransferMessage_ERROR TransferMessage_MessageSeverity = 3
)
var TransferMessage_MessageSeverity_name = map[int32]string{
0: "MESSAGE_SEVERITY_UNSPECIFIED",
1: "INFO",
2: "WARNING",
3: "ERROR",
}
var TransferMessage_MessageSeverity_value = map[string]int32{
"MESSAGE_SEVERITY_UNSPECIFIED": 0,
"INFO": 1,
"WARNING": 2,
"ERROR": 3,
}
func (x TransferMessage_MessageSeverity) String() string {
return proto.EnumName(TransferMessage_MessageSeverity_name, int32(x))
}
func (TransferMessage_MessageSeverity) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{2, 0}
}
// Represents a data transfer configuration. A transfer configuration
// contains all metadata needed to perform a data transfer. For example,
// `destination_dataset_id` specifies where data should be stored.
// When a new transfer configuration is created, the specified
// `destination_dataset_id` is created when needed and shared with the
// appropriate data source service account.
type TransferConfig struct {
// The resource name of the transfer config.
// Transfer config names have the form
// `projects/{project_id}/transferConfigs/{config_id}`.
// Where `config_id` is usually a uuid, even though it is not
// guaranteed or required. The name is ignored when creating a transfer
// config.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The BigQuery target dataset id.
DestinationDatasetId string `protobuf:"bytes,2,opt,name=destination_dataset_id,json=destinationDatasetId,proto3" json:"destination_dataset_id,omitempty"`
// User specified display name for the data transfer.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Data source id. Cannot be changed once data transfer is created.
DataSourceId string `protobuf:"bytes,5,opt,name=data_source_id,json=dataSourceId,proto3" json:"data_source_id,omitempty"`
// Data transfer specific parameters.
Params *_struct.Struct `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty"`
// Data transfer schedule.
// If the data source does not support a custom schedule, this should be
// empty. If it is empty, the default value for the data source will be
// used.
// The specified times are in UTC.
// Examples of valid format:
// `1st,3rd monday of month 15:30`,
// `every wed,fri of jan,jun 13:15`, and
// `first sunday of quarter 00:00`.
// See more explanation about the format here:
// https://cloud.google.com/appengine/docs/flexible/python/scheduling-jobs-with-cron-yaml#the_schedule_format
// NOTE: the granularity should be at least 8 hours, or less frequent.
Schedule string `protobuf:"bytes,7,opt,name=schedule,proto3" json:"schedule,omitempty"`
// The number of days to look back to automatically refresh the data.
// For example, if `data_refresh_window_days = 10`, then every day
// BigQuery reingests data for [today-10, today-1], rather than ingesting data
// for just [today-1].
// Only valid if the data source supports the feature. Set the value to 0
// to use the default value.
DataRefreshWindowDays int32 `protobuf:"varint,12,opt,name=data_refresh_window_days,json=dataRefreshWindowDays,proto3" json:"data_refresh_window_days,omitempty"`
// Is this config disabled. When set to true, no runs are scheduled
// for a given transfer.
Disabled bool `protobuf:"varint,13,opt,name=disabled,proto3" json:"disabled,omitempty"`
// Output only. Data transfer modification time. Ignored by server on input.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. Next time when data transfer will run.
NextRunTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=next_run_time,json=nextRunTime,proto3" json:"next_run_time,omitempty"`
// Output only. State of the most recently updated transfer run.
State TransferState `protobuf:"varint,10,opt,name=state,proto3,enum=google.cloud.bigquery.datatransfer.v1.TransferState" json:"state,omitempty"`
// Output only. Unique ID of the user on whose behalf transfer is done.
// Applicable only to data sources that do not support service accounts.
// When set to 0, the data source service account credentials are used.
// May be negative. Note, that this identifier is not stable.
// It may change over time even for the same user.
UserId int64 `protobuf:"varint,11,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// Output only. Region in which BigQuery dataset is located.
DatasetRegion string `protobuf:"bytes,14,opt,name=dataset_region,json=datasetRegion,proto3" json:"dataset_region,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TransferConfig) Reset() { *m = TransferConfig{} }
func (m *TransferConfig) String() string { return proto.CompactTextString(m) }
func (*TransferConfig) ProtoMessage() {}
func (*TransferConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{0}
}
func (m *TransferConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferConfig.Unmarshal(m, b)
}
func (m *TransferConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransferConfig.Marshal(b, m, deterministic)
}
func (m *TransferConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransferConfig.Merge(m, src)
}
func (m *TransferConfig) XXX_Size() int {
return xxx_messageInfo_TransferConfig.Size(m)
}
func (m *TransferConfig) XXX_DiscardUnknown() {
xxx_messageInfo_TransferConfig.DiscardUnknown(m)
}
var xxx_messageInfo_TransferConfig proto.InternalMessageInfo
func (m *TransferConfig) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *TransferConfig) GetDestinationDatasetId() string {
if m != nil {
return m.DestinationDatasetId
}
return ""
}
func (m *TransferConfig) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *TransferConfig) GetDataSourceId() string {
if m != nil {
return m.DataSourceId
}
return ""
}
func (m *TransferConfig) GetParams() *_struct.Struct {
if m != nil {
return m.Params
}
return nil
}
func (m *TransferConfig) GetSchedule() string {
if m != nil {
return m.Schedule
}
return ""
}
func (m *TransferConfig) GetDataRefreshWindowDays() int32 {
if m != nil {
return m.DataRefreshWindowDays
}
return 0
}
func (m *TransferConfig) GetDisabled() bool {
if m != nil {
return m.Disabled
}
return false
}
func (m *TransferConfig) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *TransferConfig) GetNextRunTime() *timestamp.Timestamp {
if m != nil {
return m.NextRunTime
}
return nil
}
func (m *TransferConfig) GetState() TransferState {
if m != nil {
return m.State
}
return TransferState_TRANSFER_STATE_UNSPECIFIED
}
func (m *TransferConfig) GetUserId() int64 {
if m != nil {
return m.UserId
}
return 0
}
func (m *TransferConfig) GetDatasetRegion() string {
if m != nil {
return m.DatasetRegion
}
return ""
}
// Represents a data transfer run.
type TransferRun struct {
// The resource name of the transfer run.
// Transfer run names have the form
// `projects/{project_id}/locations/{location}/transferConfigs/{config_id}/runs/{run_id}`.
// The name is ignored when creating a transfer run.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Minimum time after which a transfer run can be started.
ScheduleTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
// For batch transfer runs, specifies the date and time that
// data should be ingested.
RunTime *timestamp.Timestamp `protobuf:"bytes,10,opt,name=run_time,json=runTime,proto3" json:"run_time,omitempty"`
// Status of the transfer run.
ErrorStatus *status.Status `protobuf:"bytes,21,opt,name=error_status,json=errorStatus,proto3" json:"error_status,omitempty"`
// Output only. Time when transfer run was started.
// Parameter ignored by server for input requests.
StartTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// Output only. Time when transfer run ended.
// Parameter ignored by server for input requests.
EndTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"`
// Output only. Last time the data transfer run state was updated.
UpdateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
// Output only. Data transfer specific parameters.
Params *_struct.Struct `protobuf:"bytes,9,opt,name=params,proto3" json:"params,omitempty"`
// Output only. The BigQuery target dataset id.
DestinationDatasetId string `protobuf:"bytes,2,opt,name=destination_dataset_id,json=destinationDatasetId,proto3" json:"destination_dataset_id,omitempty"`
// Output only. Data source id.
DataSourceId string `protobuf:"bytes,7,opt,name=data_source_id,json=dataSourceId,proto3" json:"data_source_id,omitempty"`
// Data transfer run state. Ignored for input requests.
State TransferState `protobuf:"varint,8,opt,name=state,proto3,enum=google.cloud.bigquery.datatransfer.v1.TransferState" json:"state,omitempty"`
// Output only. Unique ID of the user on whose behalf transfer is done.
// Applicable only to data sources that do not support service accounts.
// When set to 0, the data source service account credentials are used.
// May be negative. Note, that this identifier is not stable.
// It may change over time even for the same user.
UserId int64 `protobuf:"varint,11,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
// Output only. Describes the schedule of this transfer run if it was
// created as part of a regular schedule. For batch transfer runs that are
// scheduled manually, this is empty.
// NOTE: the system might choose to delay the schedule depending on the
// current load, so `schedule_time` doesn't always matches this.
Schedule string `protobuf:"bytes,12,opt,name=schedule,proto3" json:"schedule,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TransferRun) Reset() { *m = TransferRun{} }
func (m *TransferRun) String() string { return proto.CompactTextString(m) }
func (*TransferRun) ProtoMessage() {}
func (*TransferRun) Descriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{1}
}
func (m *TransferRun) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferRun.Unmarshal(m, b)
}
func (m *TransferRun) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransferRun.Marshal(b, m, deterministic)
}
func (m *TransferRun) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransferRun.Merge(m, src)
}
func (m *TransferRun) XXX_Size() int {
return xxx_messageInfo_TransferRun.Size(m)
}
func (m *TransferRun) XXX_DiscardUnknown() {
xxx_messageInfo_TransferRun.DiscardUnknown(m)
}
var xxx_messageInfo_TransferRun proto.InternalMessageInfo
func (m *TransferRun) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *TransferRun) GetScheduleTime() *timestamp.Timestamp {
if m != nil {
return m.ScheduleTime
}
return nil
}
func (m *TransferRun) GetRunTime() *timestamp.Timestamp {
if m != nil {
return m.RunTime
}
return nil
}
func (m *TransferRun) GetErrorStatus() *status.Status {
if m != nil {
return m.ErrorStatus
}
return nil
}
func (m *TransferRun) GetStartTime() *timestamp.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *TransferRun) GetEndTime() *timestamp.Timestamp {
if m != nil {
return m.EndTime
}
return nil
}
func (m *TransferRun) GetUpdateTime() *timestamp.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
func (m *TransferRun) GetParams() *_struct.Struct {
if m != nil {
return m.Params
}
return nil
}
func (m *TransferRun) GetDestinationDatasetId() string {
if m != nil {
return m.DestinationDatasetId
}
return ""
}
func (m *TransferRun) GetDataSourceId() string {
if m != nil {
return m.DataSourceId
}
return ""
}
func (m *TransferRun) GetState() TransferState {
if m != nil {
return m.State
}
return TransferState_TRANSFER_STATE_UNSPECIFIED
}
func (m *TransferRun) GetUserId() int64 {
if m != nil {
return m.UserId
}
return 0
}
func (m *TransferRun) GetSchedule() string {
if m != nil {
return m.Schedule
}
return ""
}
// Represents a user facing message for a particular data transfer run.
type TransferMessage struct {
// Time when message was logged.
MessageTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=message_time,json=messageTime,proto3" json:"message_time,omitempty"`
// Message severity.
Severity TransferMessage_MessageSeverity `protobuf:"varint,2,opt,name=severity,proto3,enum=google.cloud.bigquery.datatransfer.v1.TransferMessage_MessageSeverity" json:"severity,omitempty"`
// Message text.
MessageText string `protobuf:"bytes,3,opt,name=message_text,json=messageText,proto3" json:"message_text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TransferMessage) Reset() { *m = TransferMessage{} }
func (m *TransferMessage) String() string { return proto.CompactTextString(m) }
func (*TransferMessage) ProtoMessage() {}
func (*TransferMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_90c2574420b818ad, []int{2}
}
func (m *TransferMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferMessage.Unmarshal(m, b)
}
func (m *TransferMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransferMessage.Marshal(b, m, deterministic)
}
func (m *TransferMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransferMessage.Merge(m, src)
}
func (m *TransferMessage) XXX_Size() int {
return xxx_messageInfo_TransferMessage.Size(m)
}
func (m *TransferMessage) XXX_DiscardUnknown() {
xxx_messageInfo_TransferMessage.DiscardUnknown(m)
}
var xxx_messageInfo_TransferMessage proto.InternalMessageInfo
func (m *TransferMessage) GetMessageTime() *timestamp.Timestamp {
if m != nil {
return m.MessageTime
}
return nil
}
func (m *TransferMessage) GetSeverity() TransferMessage_MessageSeverity {
if m != nil {
return m.Severity
}
return TransferMessage_MESSAGE_SEVERITY_UNSPECIFIED
}
func (m *TransferMessage) GetMessageText() string {
if m != nil {
return m.MessageText
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.bigquery.datatransfer.v1.TransferType", TransferType_name, TransferType_value)
proto.RegisterEnum("google.cloud.bigquery.datatransfer.v1.TransferState", TransferState_name, TransferState_value)
proto.RegisterEnum("google.cloud.bigquery.datatransfer.v1.TransferMessage_MessageSeverity", TransferMessage_MessageSeverity_name, TransferMessage_MessageSeverity_value)
proto.RegisterType((*TransferConfig)(nil), "google.cloud.bigquery.datatransfer.v1.TransferConfig")
proto.RegisterType((*TransferRun)(nil), "google.cloud.bigquery.datatransfer.v1.TransferRun")
proto.RegisterType((*TransferMessage)(nil), "google.cloud.bigquery.datatransfer.v1.TransferMessage")
}
func init() {
proto.RegisterFile("google/cloud/bigquery/datatransfer/v1/transfer.proto", fileDescriptor_90c2574420b818ad)
}
var fileDescriptor_90c2574420b818ad = []byte{
// 922 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xe3, 0x44,
0x14, 0xc6, 0xf9, 0xcf, 0x71, 0x92, 0x8d, 0x46, 0x2c, 0x35, 0xd5, 0x02, 0xa1, 0xa2, 0x52, 0xd8,
0x0b, 0x5b, 0x2d, 0x5d, 0x21, 0xb4, 0x02, 0x94, 0x1f, 0x27, 0x04, 0x6d, 0xb3, 0xd9, 0xb1, 0xdb,
0xd5, 0xa2, 0x4a, 0xd6, 0x24, 0x9e, 0x7a, 0x2d, 0x25, 0xb6, 0x99, 0x19, 0x77, 0x9b, 0x87, 0xe0,
0x25, 0xb8, 0xe4, 0x82, 0x07, 0xe1, 0x82, 0xd7, 0xe0, 0x35, 0x90, 0xc7, 0x76, 0x94, 0xcd, 0x56,
0x4a, 0x8b, 0xc4, 0x55, 0xe7, 0xcc, 0xf9, 0xbe, 0xaf, 0xdf, 0x9c, 0x1f, 0x2b, 0x70, 0xe6, 0x85,
0xa1, 0xb7, 0xa4, 0xc6, 0x62, 0x19, 0xc6, 0xae, 0x31, 0xf7, 0xbd, 0x5f, 0x63, 0xca, 0xd6, 0x86,
0x4b, 0x04, 0x11, 0x8c, 0x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7c, 0xcf, 0x0f, 0x80, 0xe7, 0xdb, 0xf1, 0xef, 0x85,
0xf2, 0x78, 0xd0, 0x1f, 0xda, 0x7f, 0x14, 0x8e, 0xc7, 0xa9, 0xf6, 0x40, 0x7a, 0xea, 0xfb, 0xde,
0x2b, 0xe9, 0x29, 0xd9, 0xa8, 0xdc, 0x86, 0x7e, 0x79, 0xf2, 0x57, 0x8e, 0xbb, 0x92, 0xb8, 0xab,
0x1c, 0x77, 0xb5, 0x8d, 0xbb, 0xba, 0x3c, 0x99, 0x57, 0xa4, 0xab, 0x6f, 0xfe, 0x0d, 0x00, 0x00,
0xff, 0xff, 0x0d, 0x74, 0xf0, 0x31, 0x95, 0x08, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,882 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/billing/v1/cloud_billing.proto
package billing
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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,proto3" 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,proto3" 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,proto3" json:"display_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BillingAccount) Reset() { *m = BillingAccount{} }
func (m *BillingAccount) String() string { return proto.CompactTextString(m) }
func (*BillingAccount) ProtoMessage() {}
func (*BillingAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{0}
}
func (m *BillingAccount) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BillingAccount.Unmarshal(m, b)
}
func (m *BillingAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BillingAccount.Marshal(b, m, deterministic)
}
func (m *BillingAccount) XXX_Merge(src proto.Message) {
xxx_messageInfo_BillingAccount.Merge(m, src)
}
func (m *BillingAccount) XXX_Size() int {
return xxx_messageInfo_BillingAccount.Size(m)
}
func (m *BillingAccount) XXX_DiscardUnknown() {
xxx_messageInfo_BillingAccount.DiscardUnknown(m)
}
var xxx_messageInfo_BillingAccount proto.InternalMessageInfo
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,proto3" 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,proto3" 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,proto3" 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,proto3" json:"billing_enabled,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProjectBillingInfo) Reset() { *m = ProjectBillingInfo{} }
func (m *ProjectBillingInfo) String() string { return proto.CompactTextString(m) }
func (*ProjectBillingInfo) ProtoMessage() {}
func (*ProjectBillingInfo) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{1}
}
func (m *ProjectBillingInfo) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProjectBillingInfo.Unmarshal(m, b)
}
func (m *ProjectBillingInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProjectBillingInfo.Marshal(b, m, deterministic)
}
func (m *ProjectBillingInfo) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProjectBillingInfo.Merge(m, src)
}
func (m *ProjectBillingInfo) XXX_Size() int {
return xxx_messageInfo_ProjectBillingInfo.Size(m)
}
func (m *ProjectBillingInfo) XXX_DiscardUnknown() {
xxx_messageInfo_ProjectBillingInfo.DiscardUnknown(m)
}
var xxx_messageInfo_ProjectBillingInfo proto.InternalMessageInfo
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,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetBillingAccountRequest) Reset() { *m = GetBillingAccountRequest{} }
func (m *GetBillingAccountRequest) String() string { return proto.CompactTextString(m) }
func (*GetBillingAccountRequest) ProtoMessage() {}
func (*GetBillingAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{2}
}
func (m *GetBillingAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetBillingAccountRequest.Unmarshal(m, b)
}
func (m *GetBillingAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetBillingAccountRequest.Marshal(b, m, deterministic)
}
func (m *GetBillingAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetBillingAccountRequest.Merge(m, src)
}
func (m *GetBillingAccountRequest) XXX_Size() int {
return xxx_messageInfo_GetBillingAccountRequest.Size(m)
}
func (m *GetBillingAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetBillingAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetBillingAccountRequest proto.InternalMessageInfo
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,proto3" 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,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListBillingAccountsRequest) Reset() { *m = ListBillingAccountsRequest{} }
func (m *ListBillingAccountsRequest) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsRequest) ProtoMessage() {}
func (*ListBillingAccountsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{3}
}
func (m *ListBillingAccountsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListBillingAccountsRequest.Unmarshal(m, b)
}
func (m *ListBillingAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListBillingAccountsRequest.Marshal(b, m, deterministic)
}
func (m *ListBillingAccountsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListBillingAccountsRequest.Merge(m, src)
}
func (m *ListBillingAccountsRequest) XXX_Size() int {
return xxx_messageInfo_ListBillingAccountsRequest.Size(m)
}
func (m *ListBillingAccountsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListBillingAccountsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListBillingAccountsRequest proto.InternalMessageInfo
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,proto3" 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,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListBillingAccountsResponse) Reset() { *m = ListBillingAccountsResponse{} }
func (m *ListBillingAccountsResponse) String() string { return proto.CompactTextString(m) }
func (*ListBillingAccountsResponse) ProtoMessage() {}
func (*ListBillingAccountsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{4}
}
func (m *ListBillingAccountsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListBillingAccountsResponse.Unmarshal(m, b)
}
func (m *ListBillingAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListBillingAccountsResponse.Marshal(b, m, deterministic)
}
func (m *ListBillingAccountsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListBillingAccountsResponse.Merge(m, src)
}
func (m *ListBillingAccountsResponse) XXX_Size() int {
return xxx_messageInfo_ListBillingAccountsResponse.Size(m)
}
func (m *ListBillingAccountsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListBillingAccountsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListBillingAccountsResponse proto.InternalMessageInfo
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,proto3" 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,proto3" 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,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListProjectBillingInfoRequest) Reset() { *m = ListProjectBillingInfoRequest{} }
func (m *ListProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoRequest) ProtoMessage() {}
func (*ListProjectBillingInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{5}
}
func (m *ListProjectBillingInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListProjectBillingInfoRequest.Unmarshal(m, b)
}
func (m *ListProjectBillingInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListProjectBillingInfoRequest.Marshal(b, m, deterministic)
}
func (m *ListProjectBillingInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListProjectBillingInfoRequest.Merge(m, src)
}
func (m *ListProjectBillingInfoRequest) XXX_Size() int {
return xxx_messageInfo_ListProjectBillingInfoRequest.Size(m)
}
func (m *ListProjectBillingInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListProjectBillingInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListProjectBillingInfoRequest proto.InternalMessageInfo
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,proto3" 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,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListProjectBillingInfoResponse) Reset() { *m = ListProjectBillingInfoResponse{} }
func (m *ListProjectBillingInfoResponse) String() string { return proto.CompactTextString(m) }
func (*ListProjectBillingInfoResponse) ProtoMessage() {}
func (*ListProjectBillingInfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{6}
}
func (m *ListProjectBillingInfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListProjectBillingInfoResponse.Unmarshal(m, b)
}
func (m *ListProjectBillingInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListProjectBillingInfoResponse.Marshal(b, m, deterministic)
}
func (m *ListProjectBillingInfoResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListProjectBillingInfoResponse.Merge(m, src)
}
func (m *ListProjectBillingInfoResponse) XXX_Size() int {
return xxx_messageInfo_ListProjectBillingInfoResponse.Size(m)
}
func (m *ListProjectBillingInfoResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListProjectBillingInfoResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListProjectBillingInfoResponse proto.InternalMessageInfo
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,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetProjectBillingInfoRequest) Reset() { *m = GetProjectBillingInfoRequest{} }
func (m *GetProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*GetProjectBillingInfoRequest) ProtoMessage() {}
func (*GetProjectBillingInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{7}
}
func (m *GetProjectBillingInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetProjectBillingInfoRequest.Unmarshal(m, b)
}
func (m *GetProjectBillingInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetProjectBillingInfoRequest.Marshal(b, m, deterministic)
}
func (m *GetProjectBillingInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetProjectBillingInfoRequest.Merge(m, src)
}
func (m *GetProjectBillingInfoRequest) XXX_Size() int {
return xxx_messageInfo_GetProjectBillingInfoRequest.Size(m)
}
func (m *GetProjectBillingInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetProjectBillingInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetProjectBillingInfoRequest proto.InternalMessageInfo
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,proto3" 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,proto3" json:"project_billing_info,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateProjectBillingInfoRequest) Reset() { *m = UpdateProjectBillingInfoRequest{} }
func (m *UpdateProjectBillingInfoRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateProjectBillingInfoRequest) ProtoMessage() {}
func (*UpdateProjectBillingInfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_47fe072480332805, []int{8}
}
func (m *UpdateProjectBillingInfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateProjectBillingInfoRequest.Unmarshal(m, b)
}
func (m *UpdateProjectBillingInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateProjectBillingInfoRequest.Marshal(b, m, deterministic)
}
func (m *UpdateProjectBillingInfoRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateProjectBillingInfoRequest.Merge(m, src)
}
func (m *UpdateProjectBillingInfoRequest) XXX_Size() int {
return xxx_messageInfo_UpdateProjectBillingInfoRequest.Size(m)
}
func (m *UpdateProjectBillingInfoRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateProjectBillingInfoRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateProjectBillingInfoRequest proto.InternalMessageInfo
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
// CloudBillingClient is the client API for CloudBilling service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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 := c.cc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetBillingAccount", in, out, 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 := c.cc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListBillingAccounts", in, out, 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 := c.cc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/ListProjectBillingInfo", in, out, 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 := c.cc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/GetProjectBillingInfo", in, out, 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 := c.cc.Invoke(ctx, "/google.cloud.billing.v1.CloudBilling/UpdateProjectBillingInfo", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// CloudBillingServer is the 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", fileDescriptor_47fe072480332805)
}
var fileDescriptor_47fe072480332805 = []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, 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61, 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,283 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dataproc/v1/operations.proto
package dataproc
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/empty"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
_ "google.golang.org/genproto/googleapis/longrunning"
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
// 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 fileDescriptor_78b4f56947714756, []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,proto3,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,proto3" json:"inner_state,omitempty"`
// Output-only.A message containing any operation metadata details.
Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
// Output-only. The time this state was entered.
StateStartTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=state_start_time,json=stateStartTime,proto3" json:"state_start_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterOperationStatus) Reset() { *m = ClusterOperationStatus{} }
func (m *ClusterOperationStatus) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationStatus) ProtoMessage() {}
func (*ClusterOperationStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_78b4f56947714756, []int{0}
}
func (m *ClusterOperationStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterOperationStatus.Unmarshal(m, b)
}
func (m *ClusterOperationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClusterOperationStatus.Marshal(b, m, deterministic)
}
func (m *ClusterOperationStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterOperationStatus.Merge(m, src)
}
func (m *ClusterOperationStatus) XXX_Size() int {
return xxx_messageInfo_ClusterOperationStatus.Size(m)
}
func (m *ClusterOperationStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterOperationStatus.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterOperationStatus proto.InternalMessageInfo
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() *timestamp.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,proto3" json:"cluster_name,omitempty"`
// Output-only. Cluster UUID for the operation.
ClusterUuid string `protobuf:"bytes,8,opt,name=cluster_uuid,json=clusterUuid,proto3" json:"cluster_uuid,omitempty"`
// Output-only. Current operation status.
Status *ClusterOperationStatus `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
// Output-only. The previous operation status.
StatusHistory []*ClusterOperationStatus `protobuf:"bytes,10,rep,name=status_history,json=statusHistory,proto3" json:"status_history,omitempty"`
// Output-only. The operation type.
OperationType string `protobuf:"bytes,11,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"`
// Output-only. Short description of operation.
Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"`
// Output-only. Labels associated with the operation
Labels map[string]string `protobuf:"bytes,13,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Output-only. Errors encountered during operation execution.
Warnings []string `protobuf:"bytes,14,rep,name=warnings,proto3" json:"warnings,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterOperationMetadata) Reset() { *m = ClusterOperationMetadata{} }
func (m *ClusterOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationMetadata) ProtoMessage() {}
func (*ClusterOperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_78b4f56947714756, []int{1}
}
func (m *ClusterOperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterOperationMetadata.Unmarshal(m, b)
}
func (m *ClusterOperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClusterOperationMetadata.Marshal(b, m, deterministic)
}
func (m *ClusterOperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterOperationMetadata.Merge(m, src)
}
func (m *ClusterOperationMetadata) XXX_Size() int {
return xxx_messageInfo_ClusterOperationMetadata.Size(m)
}
func (m *ClusterOperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterOperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterOperationMetadata proto.InternalMessageInfo
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 (m *ClusterOperationMetadata) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *ClusterOperationMetadata) GetWarnings() []string {
if m != nil {
return m.Warnings
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.dataproc.v1.ClusterOperationStatus_State", ClusterOperationStatus_State_name, ClusterOperationStatus_State_value)
proto.RegisterType((*ClusterOperationStatus)(nil), "google.cloud.dataproc.v1.ClusterOperationStatus")
proto.RegisterType((*ClusterOperationMetadata)(nil), "google.cloud.dataproc.v1.ClusterOperationMetadata")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.dataproc.v1.ClusterOperationMetadata.LabelsEntry")
}
func init() {
proto.RegisterFile("google/cloud/dataproc/v1/operations.proto", fileDescriptor_78b4f56947714756)
}
var fileDescriptor_78b4f56947714756 = []byte{
// 553 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x61, 0x6b, 0xd3, 0x40,
0x18, 0x36, 0xcd, 0xb6, 0xb6, 0x97, 0xb5, 0x96, 0x43, 0xe4, 0x88, 0x83, 0xc5, 0x8a, 0x50, 0xbf,
0x24, 0x6e, 0x82, 0x4c, 0x05, 0x91, 0xd9, 0xe2, 0xc4, 0x99, 0x96, 0x6c, 0x75, 0xe0, 0x97, 0x72,
0x6d, 0xce, 0x18, 0x4c, 0xee, 0xc2, 0xdd, 0xa5, 0x92, 0x9f, 0xe3, 0xef, 0xf4, 0x8b, 0xdc, 0x5d,
0x52, 0xea, 0xe6, 0x40, 0xfd, 0xd4, 0x7b, 0xde, 0xf7, 0x79, 0x9e, 0xbe, 0xcf, 0xcb, 0xdb, 0x82,
0x27, 0x09, 0x63, 0x49, 0x46, 0x82, 0x55, 0xc6, 0xca, 0x38, 0x88, 0xb1, 0xc4, 0x05, 0x67, 0xab,
0x60, 0x7d, 0x14, 0xb0, 0x82, 0x70, 0x2c, 0x53, 0x46, 0x85, 0x5f, 0x70, 0x26, 0x19, 0x44, 0x86,
0xea, 0x6b, 0xaa, 0xdf, 0x50, 0xfd, 0xf5, 0x91, 0x7b, 0x50, 0x9b, 0xe0, 0x22, 0x0d, 0x30, 0xa5,
0x4c, 0x6e, 0xeb, 0xdc, 0x47, 0x75, 0x37, 0x63, 0x34, 0xe1, 0x25, 0xa5, 0x29, 0x4d, 0x6e, 0x98,
0xbb, 0x0f, 0x6a, 0x92, 0x46, 0xcb, 0xf2, 0x4b, 0x40, 0xf2, 0x42, 0x56, 0x75, 0xf3, 0xf0, 0x7a,
0x53, 0xa6, 0x39, 0x11, 0x12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x55, 0xf3, 0x5e, 0xee, 0x69, 0xf2, 0xb3, 0x5f, 0x01, 0x00, 0x00, 0xff,
0xff, 0x09, 0x4c, 0x3d, 0x35, 0x65, 0x04, 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,280 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dataproc/v1beta2/operations.proto
package dataproc
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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 fileDescriptor_e6e7a565fff113fd, []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,proto3,enum=google.cloud.dataproc.v1beta2.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,proto3" json:"inner_state,omitempty"`
// Output only. A message containing any operation metadata details.
Details string `protobuf:"bytes,3,opt,name=details,proto3" json:"details,omitempty"`
// Output only. The time this state was entered.
StateStartTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=state_start_time,json=stateStartTime,proto3" json:"state_start_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterOperationStatus) Reset() { *m = ClusterOperationStatus{} }
func (m *ClusterOperationStatus) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationStatus) ProtoMessage() {}
func (*ClusterOperationStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_e6e7a565fff113fd, []int{0}
}
func (m *ClusterOperationStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterOperationStatus.Unmarshal(m, b)
}
func (m *ClusterOperationStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClusterOperationStatus.Marshal(b, m, deterministic)
}
func (m *ClusterOperationStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterOperationStatus.Merge(m, src)
}
func (m *ClusterOperationStatus) XXX_Size() int {
return xxx_messageInfo_ClusterOperationStatus.Size(m)
}
func (m *ClusterOperationStatus) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterOperationStatus.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterOperationStatus proto.InternalMessageInfo
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() *timestamp.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,proto3" json:"cluster_name,omitempty"`
// Output only. Cluster UUID for the operation.
ClusterUuid string `protobuf:"bytes,8,opt,name=cluster_uuid,json=clusterUuid,proto3" json:"cluster_uuid,omitempty"`
// Output only. Current operation status.
Status *ClusterOperationStatus `protobuf:"bytes,9,opt,name=status,proto3" json:"status,omitempty"`
// Output only. The previous operation status.
StatusHistory []*ClusterOperationStatus `protobuf:"bytes,10,rep,name=status_history,json=statusHistory,proto3" json:"status_history,omitempty"`
// Output only. The operation type.
OperationType string `protobuf:"bytes,11,opt,name=operation_type,json=operationType,proto3" json:"operation_type,omitempty"`
// Output only. Short description of operation.
Description string `protobuf:"bytes,12,opt,name=description,proto3" json:"description,omitempty"`
// Output only. Labels associated with the operation
Labels map[string]string `protobuf:"bytes,13,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Output only. Errors encountered during operation execution.
Warnings []string `protobuf:"bytes,14,rep,name=warnings,proto3" json:"warnings,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ClusterOperationMetadata) Reset() { *m = ClusterOperationMetadata{} }
func (m *ClusterOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*ClusterOperationMetadata) ProtoMessage() {}
func (*ClusterOperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_e6e7a565fff113fd, []int{1}
}
func (m *ClusterOperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ClusterOperationMetadata.Unmarshal(m, b)
}
func (m *ClusterOperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ClusterOperationMetadata.Marshal(b, m, deterministic)
}
func (m *ClusterOperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_ClusterOperationMetadata.Merge(m, src)
}
func (m *ClusterOperationMetadata) XXX_Size() int {
return xxx_messageInfo_ClusterOperationMetadata.Size(m)
}
func (m *ClusterOperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_ClusterOperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_ClusterOperationMetadata proto.InternalMessageInfo
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 (m *ClusterOperationMetadata) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *ClusterOperationMetadata) GetWarnings() []string {
if m != nil {
return m.Warnings
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.dataproc.v1beta2.ClusterOperationStatus_State", ClusterOperationStatus_State_name, ClusterOperationStatus_State_value)
proto.RegisterType((*ClusterOperationStatus)(nil), "google.cloud.dataproc.v1beta2.ClusterOperationStatus")
proto.RegisterType((*ClusterOperationMetadata)(nil), "google.cloud.dataproc.v1beta2.ClusterOperationMetadata")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.dataproc.v1beta2.ClusterOperationMetadata.LabelsEntry")
}
func init() {
proto.RegisterFile("google/cloud/dataproc/v1beta2/operations.proto", fileDescriptor_e6e7a565fff113fd)
}
var fileDescriptor_e6e7a565fff113fd = []byte{
// 537 bytes of a gzipped FileDescriptorProto
0x1f, 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x04, 0xfd, 0xfd, 0xaa, 0xae, 0xd4, 0x2e, 0xa7, 0xd8, 0x35, 0x89, 0x7a, 0xfb,
0xee, 0xf5, 0x2e, 0xa7, 0xc8, 0x03, 0x37, 0xa6, 0x72, 0x23, 0xd2, 0x5c, 0xb7, 0xf0, 0x91, 0x4d,
0x7d, 0xd0, 0x42, 0x1f, 0xa0, 0x95, 0x91, 0x35, 0xcd, 0x24, 0xee, 0x19, 0x7b, 0x17, 0xff, 0x68,
0xaf, 0xfa, 0x13, 0xfc, 0x37, 0x46, 0x65, 0xc6, 0x94, 0xd8, 0x45, 0xa5, 0x24, 0x1a, 0x42, 0xe7,
0x2b, 0x11, 0x2c, 0x65, 0x89, 0xc4, 0x7d, 0xaf, 0x3e, 0xee, 0x46, 0xfb, 0x7a, 0xf8, 0x0c, 0xdc,
0x03, 0x0a, 0x1a, 0x40, 0xfd, 0x0b, 0xdd, 0x99, 0x65, 0xef, 0x46, 0xfa, 0x88, 0xee, 0x41, 0xf3,
0x86, 0x64, 0x45, 0xb5, 0xa7, 0xb6, 0x78, 0x5e, 0x3b, 0x75, 0xce, 0xbf, 0xc1, 0xc9, 0x86, 0x6f,
0x6f, 0x37, 0x7a, 0xfe, 0xff, 0xde, 0xa2, 0x5c, 0xe8, 0xcd, 0x5c, 0x38, 0xef, 0x67, 0x25, 0x23,
0xe1, 0x19, 0x61, 0x89, 0xcf, 0x45, 0x12, 0x24, 0x94, 0x99, 0xbd, 0x0d, 0xec, 0x88, 0xe4, 0xa9,
0xfc, 0xcb, 0xa7, 0xe1, 0xac, 0x6a, 0xac, 0x5b, 0x86, 0xf1, 0xe4, 0x67, 0x00, 0x00, 0x00, 0xff,
0xff, 0x83, 0x10, 0x95, 0x5e, 0x4b, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,40 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dataproc/v1beta2/shared.proto
package dataproc
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
func init() {
proto.RegisterFile("google/cloud/dataproc/v1beta2/shared.proto", fileDescriptor_2474c85b30841989)
}
var fileDescriptor_2474c85b30841989 = []byte{
// 157 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x8e, 0xa1, 0x0e, 0x02, 0x31,
0x0c, 0x40, 0x83, 0x41, 0x1c, 0x0e, 0x49, 0x40, 0x60, 0x11, 0x6d, 0x00, 0x89, 0xbb, 0x04, 0x7f,
0x09, 0x0e, 0xd7, 0xdb, 0x96, 0xb2, 0x64, 0xac, 0xcb, 0x36, 0x48, 0xf8, 0x7b, 0xc2, 0xb6, 0x93,
0x9c, 0x6d, 0xdf, 0x7b, 0x6d, 0x77, 0x60, 0x11, 0x76, 0x06, 0x95, 0x93, 0x97, 0x46, 0x4d, 0x99,
0x42, 0x14, 0x85, 0xef, 0xe3, 0x68, 0x32, 0x9d, 0x30, 0x3d, 0x28, 0x1a, 0x0d, 0x21, 0x4a, 0x96,
0xf5, 0xae, 0xb2, 0x50, 0x58, 0x98, 0x58, 0x68, 0xec, 0x66, 0xdb, 0x52, 0x14, 0x2c, 0x92, 0xf7,
0x92, 0x29, 0x5b, 0xf1, 0xa9, 0xca, 0xfd, 0xa7, 0xdb, 0x2b, 0x79, 0xc2, 0x6c, 0xa2, 0x5f, 0xdd,
0xca, 0xbd, 0xe1, 0x67, 0x0c, 0x8b, 0xfb, 0xb5, 0xd1, 0x2c, 0x8e, 0x3c, 0x83, 0x44, 0x46, 0x36,
0xbe, 0xf4, 0xb0, 0xae, 0x28, 0xd8, 0xf4, 0xe7, 0xf7, 0xcb, 0x34, 0x18, 0x97, 0xc5, 0x38, 0x7f,
0x03, 0x00, 0x00, 0xff, 0xff, 0x63, 0xea, 0xb3, 0xa5, 0xec, 0x00, 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,748 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2/context.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// Represents a context.
type Context struct {
// Required. The unique identifier of the context. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. The number of conversational query requests after which the
// context expires. If set to `0` (the default) the context expires
// immediately. Contexts expire automatically after 10 minutes even if there
// are no matching queries.
LifespanCount int32 `protobuf:"varint,2,opt,name=lifespan_count,json=lifespanCount,proto3" json:"lifespan_count,omitempty"`
// Optional. The collection of parameters associated with this context.
// Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
// syntax.
Parameters *_struct.Struct `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Context) Reset() { *m = Context{} }
func (m *Context) String() string { return proto.CompactTextString(m) }
func (*Context) ProtoMessage() {}
func (*Context) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{0}
}
func (m *Context) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Context.Unmarshal(m, b)
}
func (m *Context) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Context.Marshal(b, m, deterministic)
}
func (m *Context) XXX_Merge(src proto.Message) {
xxx_messageInfo_Context.Merge(m, src)
}
func (m *Context) XXX_Size() int {
return xxx_messageInfo_Context.Size(m)
}
func (m *Context) XXX_DiscardUnknown() {
xxx_messageInfo_Context.DiscardUnknown(m)
}
var xxx_messageInfo_Context proto.InternalMessageInfo
func (m *Context) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Context) GetLifespanCount() int32 {
if m != nil {
return m.LifespanCount
}
return 0
}
func (m *Context) GetParameters() *_struct.Struct {
if m != nil {
return m.Parameters
}
return nil
}
// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
type ListContextsRequest struct {
// Required. The session to list all contexts from.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 100 and at most 1000.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListContextsRequest) Reset() { *m = ListContextsRequest{} }
func (m *ListContextsRequest) String() string { return proto.CompactTextString(m) }
func (*ListContextsRequest) ProtoMessage() {}
func (*ListContextsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{1}
}
func (m *ListContextsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListContextsRequest.Unmarshal(m, b)
}
func (m *ListContextsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListContextsRequest.Marshal(b, m, deterministic)
}
func (m *ListContextsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListContextsRequest.Merge(m, src)
}
func (m *ListContextsRequest) XXX_Size() int {
return xxx_messageInfo_ListContextsRequest.Size(m)
}
func (m *ListContextsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListContextsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListContextsRequest proto.InternalMessageInfo
func (m *ListContextsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListContextsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListContextsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2.Contexts.ListContexts].
type ListContextsResponse struct {
// The list of contexts. There will be a maximum number of items
// returned based on the page_size field in the request.
Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListContextsResponse) Reset() { *m = ListContextsResponse{} }
func (m *ListContextsResponse) String() string { return proto.CompactTextString(m) }
func (*ListContextsResponse) ProtoMessage() {}
func (*ListContextsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{2}
}
func (m *ListContextsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListContextsResponse.Unmarshal(m, b)
}
func (m *ListContextsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListContextsResponse.Marshal(b, m, deterministic)
}
func (m *ListContextsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListContextsResponse.Merge(m, src)
}
func (m *ListContextsResponse) XXX_Size() int {
return xxx_messageInfo_ListContextsResponse.Size(m)
}
func (m *ListContextsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListContextsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListContextsResponse proto.InternalMessageInfo
func (m *ListContextsResponse) GetContexts() []*Context {
if m != nil {
return m.Contexts
}
return nil
}
func (m *ListContextsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
type GetContextRequest struct {
// Required. The name of the context. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetContextRequest) Reset() { *m = GetContextRequest{} }
func (m *GetContextRequest) String() string { return proto.CompactTextString(m) }
func (*GetContextRequest) ProtoMessage() {}
func (*GetContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{3}
}
func (m *GetContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetContextRequest.Unmarshal(m, b)
}
func (m *GetContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetContextRequest.Marshal(b, m, deterministic)
}
func (m *GetContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetContextRequest.Merge(m, src)
}
func (m *GetContextRequest) XXX_Size() int {
return xxx_messageInfo_GetContextRequest.Size(m)
}
func (m *GetContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetContextRequest proto.InternalMessageInfo
func (m *GetContextRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2.Contexts.CreateContext].
type CreateContextRequest struct {
// Required. The session to create a context for.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The context to create.
Context *Context `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateContextRequest) Reset() { *m = CreateContextRequest{} }
func (m *CreateContextRequest) String() string { return proto.CompactTextString(m) }
func (*CreateContextRequest) ProtoMessage() {}
func (*CreateContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{4}
}
func (m *CreateContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateContextRequest.Unmarshal(m, b)
}
func (m *CreateContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateContextRequest.Marshal(b, m, deterministic)
}
func (m *CreateContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateContextRequest.Merge(m, src)
}
func (m *CreateContextRequest) XXX_Size() int {
return xxx_messageInfo_CreateContextRequest.Size(m)
}
func (m *CreateContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateContextRequest proto.InternalMessageInfo
func (m *CreateContextRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateContextRequest) GetContext() *Context {
if m != nil {
return m.Context
}
return nil
}
// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2.Contexts.UpdateContext].
type UpdateContextRequest struct {
// Required. The context to update.
Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
// Optional. The mask to control which fields get updated.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateContextRequest) Reset() { *m = UpdateContextRequest{} }
func (m *UpdateContextRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateContextRequest) ProtoMessage() {}
func (*UpdateContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{5}
}
func (m *UpdateContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateContextRequest.Unmarshal(m, b)
}
func (m *UpdateContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateContextRequest.Marshal(b, m, deterministic)
}
func (m *UpdateContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateContextRequest.Merge(m, src)
}
func (m *UpdateContextRequest) XXX_Size() int {
return xxx_messageInfo_UpdateContextRequest.Size(m)
}
func (m *UpdateContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateContextRequest proto.InternalMessageInfo
func (m *UpdateContextRequest) GetContext() *Context {
if m != nil {
return m.Context
}
return nil
}
func (m *UpdateContextRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2.Contexts.DeleteContext].
type DeleteContextRequest struct {
// Required. The name of the context to delete. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteContextRequest) Reset() { *m = DeleteContextRequest{} }
func (m *DeleteContextRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteContextRequest) ProtoMessage() {}
func (*DeleteContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{6}
}
func (m *DeleteContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteContextRequest.Unmarshal(m, b)
}
func (m *DeleteContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteContextRequest.Marshal(b, m, deterministic)
}
func (m *DeleteContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteContextRequest.Merge(m, src)
}
func (m *DeleteContextRequest) XXX_Size() int {
return xxx_messageInfo_DeleteContextRequest.Size(m)
}
func (m *DeleteContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteContextRequest proto.InternalMessageInfo
func (m *DeleteContextRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2.Contexts.DeleteAllContexts].
type DeleteAllContextsRequest struct {
// Required. The name of the session to delete all contexts from. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteAllContextsRequest) Reset() { *m = DeleteAllContextsRequest{} }
func (m *DeleteAllContextsRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteAllContextsRequest) ProtoMessage() {}
func (*DeleteAllContextsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e7e2e3bf8515c3b3, []int{7}
}
func (m *DeleteAllContextsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteAllContextsRequest.Unmarshal(m, b)
}
func (m *DeleteAllContextsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteAllContextsRequest.Marshal(b, m, deterministic)
}
func (m *DeleteAllContextsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteAllContextsRequest.Merge(m, src)
}
func (m *DeleteAllContextsRequest) XXX_Size() int {
return xxx_messageInfo_DeleteAllContextsRequest.Size(m)
}
func (m *DeleteAllContextsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteAllContextsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteAllContextsRequest proto.InternalMessageInfo
func (m *DeleteAllContextsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func init() {
proto.RegisterType((*Context)(nil), "google.cloud.dialogflow.v2.Context")
proto.RegisterType((*ListContextsRequest)(nil), "google.cloud.dialogflow.v2.ListContextsRequest")
proto.RegisterType((*ListContextsResponse)(nil), "google.cloud.dialogflow.v2.ListContextsResponse")
proto.RegisterType((*GetContextRequest)(nil), "google.cloud.dialogflow.v2.GetContextRequest")
proto.RegisterType((*CreateContextRequest)(nil), "google.cloud.dialogflow.v2.CreateContextRequest")
proto.RegisterType((*UpdateContextRequest)(nil), "google.cloud.dialogflow.v2.UpdateContextRequest")
proto.RegisterType((*DeleteContextRequest)(nil), "google.cloud.dialogflow.v2.DeleteContextRequest")
proto.RegisterType((*DeleteAllContextsRequest)(nil), "google.cloud.dialogflow.v2.DeleteAllContextsRequest")
}
// 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
// ContextsClient is the client API for Contexts service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ContextsClient interface {
// Returns the list of all contexts in the specified session.
ListContexts(ctx context.Context, in *ListContextsRequest, opts ...grpc.CallOption) (*ListContextsResponse, error)
// Retrieves the specified context.
GetContext(ctx context.Context, in *GetContextRequest, opts ...grpc.CallOption) (*Context, error)
// Creates a context.
CreateContext(ctx context.Context, in *CreateContextRequest, opts ...grpc.CallOption) (*Context, error)
// Updates the specified context.
UpdateContext(ctx context.Context, in *UpdateContextRequest, opts ...grpc.CallOption) (*Context, error)
// Deletes the specified context.
DeleteContext(ctx context.Context, in *DeleteContextRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Deletes all active contexts in the specified session.
DeleteAllContexts(ctx context.Context, in *DeleteAllContextsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type contextsClient struct {
cc *grpc.ClientConn
}
func NewContextsClient(cc *grpc.ClientConn) ContextsClient {
return &contextsClient{cc}
}
func (c *contextsClient) ListContexts(ctx context.Context, in *ListContextsRequest, opts ...grpc.CallOption) (*ListContextsResponse, error) {
out := new(ListContextsResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/ListContexts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) GetContext(ctx context.Context, in *GetContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/GetContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) CreateContext(ctx context.Context, in *CreateContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/CreateContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) UpdateContext(ctx context.Context, in *UpdateContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/UpdateContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) DeleteContext(ctx context.Context, in *DeleteContextRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/DeleteContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) DeleteAllContexts(ctx context.Context, in *DeleteAllContextsRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ContextsServer is the server API for Contexts service.
type ContextsServer interface {
// Returns the list of all contexts in the specified session.
ListContexts(context.Context, *ListContextsRequest) (*ListContextsResponse, error)
// Retrieves the specified context.
GetContext(context.Context, *GetContextRequest) (*Context, error)
// Creates a context.
CreateContext(context.Context, *CreateContextRequest) (*Context, error)
// Updates the specified context.
UpdateContext(context.Context, *UpdateContextRequest) (*Context, error)
// Deletes the specified context.
DeleteContext(context.Context, *DeleteContextRequest) (*empty.Empty, error)
// Deletes all active contexts in the specified session.
DeleteAllContexts(context.Context, *DeleteAllContextsRequest) (*empty.Empty, error)
}
func RegisterContextsServer(s *grpc.Server, srv ContextsServer) {
s.RegisterService(&_Contexts_serviceDesc, srv)
}
func _Contexts_ListContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListContextsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).ListContexts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/ListContexts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).ListContexts(ctx, req.(*ListContextsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_GetContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).GetContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/GetContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).GetContext(ctx, req.(*GetContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_CreateContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).CreateContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/CreateContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).CreateContext(ctx, req.(*CreateContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_UpdateContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).UpdateContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/UpdateContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).UpdateContext(ctx, req.(*UpdateContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_DeleteContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).DeleteContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/DeleteContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).DeleteContext(ctx, req.(*DeleteContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_DeleteAllContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAllContextsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).DeleteAllContexts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.Contexts/DeleteAllContexts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).DeleteAllContexts(ctx, req.(*DeleteAllContextsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Contexts_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2.Contexts",
HandlerType: (*ContextsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListContexts",
Handler: _Contexts_ListContexts_Handler,
},
{
MethodName: "GetContext",
Handler: _Contexts_GetContext_Handler,
},
{
MethodName: "CreateContext",
Handler: _Contexts_CreateContext_Handler,
},
{
MethodName: "UpdateContext",
Handler: _Contexts_UpdateContext_Handler,
},
{
MethodName: "DeleteContext",
Handler: _Contexts_DeleteContext_Handler,
},
{
MethodName: "DeleteAllContexts",
Handler: _Contexts_DeleteAllContexts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2/context.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2/context.proto", fileDescriptor_e7e2e3bf8515c3b3)
}
var fileDescriptor_e7e2e3bf8515c3b3 = []byte{
// 715 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x95, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0xe5, 0x0e, 0xf6, 0xe7, 0xdd, 0x0a, 0x9a, 0xa9, 0x46, 0x95, 0x0d, 0x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, 0xd8, 0x6b, 0x0a, 0x36, 0xf9, 0x35, 0x4c, 0x52, 0xd8, 0x2e, 0xf4,
0x17, 0x04, 0xd9, 0xbe, 0xe6, 0x18, 0x0f, 0x3d, 0xaa, 0x8f, 0x8c, 0xa5, 0xa1, 0x3e, 0x7c, 0x1c,
0xfd, 0x55, 0x92, 0x8b, 0x2f, 0xfd, 0xc7, 0xc5, 0x7f, 0x45, 0xb0, 0x38, 0xd4, 0x87, 0xf8, 0xee,
0xbf, 0xd1, 0x86, 0xdb, 0x36, 0x25, 0xde, 0x24, 0x77, 0xbe, 0x79, 0x82, 0xe0, 0x6a, 0x9d, 0xb7,
0xc6, 0xe0, 0x6c, 0x2e, 0x68, 0x8c, 0x9d, 0xc8, 0x74, 0x07, 0xbd, 0xaa, 0x68, 0xad, 0xc3, 0x3d,
0xea, 0x3b, 0x16, 0x0f, 0x1d, 0xe2, 0x30, 0x5f, 0x21, 0x91, 0x78, 0x8a, 0x06, 0xae, 0x18, 0xf5,
0xf3, 0x5f, 0xef, 0xbe, 0xfd, 0x41, 0xe8, 0x5b, 0x26, 0x53, 0xd9, 0x3a, 0xcd, 0x18, 0xdb, 0xf1,
0x76, 0x65, 0x65, 0x5d, 0xe9, 0x5a, 0xbf, 0xb4, 0xf7, 0xa6, 0xd5, 0xae, 0xab, 0x7f, 0x03, 0x00,
0x00, 0xff, 0xff, 0xb8, 0xb1, 0x2f, 0xbf, 0x51, 0x08, 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

View file

@ -0,0 +1,721 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2/session_entity_type.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The types of modifications for a session entity type.
type SessionEntityType_EntityOverrideMode int32
const (
// Not specified. This value should be never used.
SessionEntityType_ENTITY_OVERRIDE_MODE_UNSPECIFIED SessionEntityType_EntityOverrideMode = 0
// The collection of session entities overrides the collection of entities
// in the corresponding developer entity type.
SessionEntityType_ENTITY_OVERRIDE_MODE_OVERRIDE SessionEntityType_EntityOverrideMode = 1
// The collection of session entities extends the collection of entities in
// the corresponding developer entity type.
// Calls to `ListSessionEntityTypes`, `GetSessionEntityType`,
// `CreateSessionEntityType` and `UpdateSessionEntityType` return the full
// collection of entities from the developer entity type in the agent's
// default language and the session entity type.
SessionEntityType_ENTITY_OVERRIDE_MODE_SUPPLEMENT SessionEntityType_EntityOverrideMode = 2
)
var SessionEntityType_EntityOverrideMode_name = map[int32]string{
0: "ENTITY_OVERRIDE_MODE_UNSPECIFIED",
1: "ENTITY_OVERRIDE_MODE_OVERRIDE",
2: "ENTITY_OVERRIDE_MODE_SUPPLEMENT",
}
var SessionEntityType_EntityOverrideMode_value = map[string]int32{
"ENTITY_OVERRIDE_MODE_UNSPECIFIED": 0,
"ENTITY_OVERRIDE_MODE_OVERRIDE": 1,
"ENTITY_OVERRIDE_MODE_SUPPLEMENT": 2,
}
func (x SessionEntityType_EntityOverrideMode) String() string {
return proto.EnumName(SessionEntityType_EntityOverrideMode_name, int32(x))
}
func (SessionEntityType_EntityOverrideMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{0, 0}
}
// Represents a session entity type.
//
// Extends or replaces a developer entity type at the user session level (we
// refer to the entity types defined at the agent level as "developer entity
// types").
//
// Note: session entity types apply to all queries, regardless of the language.
type SessionEntityType struct {
// Required. The unique identifier of this session entity type. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Indicates whether the additional data should override or
// supplement the developer entity type definition.
EntityOverrideMode SessionEntityType_EntityOverrideMode `protobuf:"varint,2,opt,name=entity_override_mode,json=entityOverrideMode,proto3,enum=google.cloud.dialogflow.v2.SessionEntityType_EntityOverrideMode" json:"entity_override_mode,omitempty"`
// Required. The collection of entities associated with this session entity
// type.
Entities []*EntityType_Entity `protobuf:"bytes,3,rep,name=entities,proto3" json:"entities,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SessionEntityType) Reset() { *m = SessionEntityType{} }
func (m *SessionEntityType) String() string { return proto.CompactTextString(m) }
func (*SessionEntityType) ProtoMessage() {}
func (*SessionEntityType) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{0}
}
func (m *SessionEntityType) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SessionEntityType.Unmarshal(m, b)
}
func (m *SessionEntityType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SessionEntityType.Marshal(b, m, deterministic)
}
func (m *SessionEntityType) XXX_Merge(src proto.Message) {
xxx_messageInfo_SessionEntityType.Merge(m, src)
}
func (m *SessionEntityType) XXX_Size() int {
return xxx_messageInfo_SessionEntityType.Size(m)
}
func (m *SessionEntityType) XXX_DiscardUnknown() {
xxx_messageInfo_SessionEntityType.DiscardUnknown(m)
}
var xxx_messageInfo_SessionEntityType proto.InternalMessageInfo
func (m *SessionEntityType) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *SessionEntityType) GetEntityOverrideMode() SessionEntityType_EntityOverrideMode {
if m != nil {
return m.EntityOverrideMode
}
return SessionEntityType_ENTITY_OVERRIDE_MODE_UNSPECIFIED
}
func (m *SessionEntityType) GetEntities() []*EntityType_Entity {
if m != nil {
return m.Entities
}
return nil
}
// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
type ListSessionEntityTypesRequest struct {
// Required. The session to list all session entity types from.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 100 and at most 1000.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSessionEntityTypesRequest) Reset() { *m = ListSessionEntityTypesRequest{} }
func (m *ListSessionEntityTypesRequest) String() string { return proto.CompactTextString(m) }
func (*ListSessionEntityTypesRequest) ProtoMessage() {}
func (*ListSessionEntityTypesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{1}
}
func (m *ListSessionEntityTypesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListSessionEntityTypesRequest.Unmarshal(m, b)
}
func (m *ListSessionEntityTypesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListSessionEntityTypesRequest.Marshal(b, m, deterministic)
}
func (m *ListSessionEntityTypesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSessionEntityTypesRequest.Merge(m, src)
}
func (m *ListSessionEntityTypesRequest) XXX_Size() int {
return xxx_messageInfo_ListSessionEntityTypesRequest.Size(m)
}
func (m *ListSessionEntityTypesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListSessionEntityTypesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListSessionEntityTypesRequest proto.InternalMessageInfo
func (m *ListSessionEntityTypesRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListSessionEntityTypesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListSessionEntityTypesRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2.SessionEntityTypes.ListSessionEntityTypes].
type ListSessionEntityTypesResponse struct {
// The list of session entity types. There will be a maximum number of items
// returned based on the page_size field in the request.
SessionEntityTypes []*SessionEntityType `protobuf:"bytes,1,rep,name=session_entity_types,json=sessionEntityTypes,proto3" json:"session_entity_types,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSessionEntityTypesResponse) Reset() { *m = ListSessionEntityTypesResponse{} }
func (m *ListSessionEntityTypesResponse) String() string { return proto.CompactTextString(m) }
func (*ListSessionEntityTypesResponse) ProtoMessage() {}
func (*ListSessionEntityTypesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{2}
}
func (m *ListSessionEntityTypesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListSessionEntityTypesResponse.Unmarshal(m, b)
}
func (m *ListSessionEntityTypesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListSessionEntityTypesResponse.Marshal(b, m, deterministic)
}
func (m *ListSessionEntityTypesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSessionEntityTypesResponse.Merge(m, src)
}
func (m *ListSessionEntityTypesResponse) XXX_Size() int {
return xxx_messageInfo_ListSessionEntityTypesResponse.Size(m)
}
func (m *ListSessionEntityTypesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListSessionEntityTypesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListSessionEntityTypesResponse proto.InternalMessageInfo
func (m *ListSessionEntityTypesResponse) GetSessionEntityTypes() []*SessionEntityType {
if m != nil {
return m.SessionEntityTypes
}
return nil
}
func (m *ListSessionEntityTypesResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.GetSessionEntityType].
type GetSessionEntityTypeRequest struct {
// Required. The name of the session entity type. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSessionEntityTypeRequest) Reset() { *m = GetSessionEntityTypeRequest{} }
func (m *GetSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*GetSessionEntityTypeRequest) ProtoMessage() {}
func (*GetSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{3}
}
func (m *GetSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *GetSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *GetSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSessionEntityTypeRequest.Merge(m, src)
}
func (m *GetSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_GetSessionEntityTypeRequest.Size(m)
}
func (m *GetSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSessionEntityTypeRequest proto.InternalMessageInfo
func (m *GetSessionEntityTypeRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.CreateSessionEntityType].
type CreateSessionEntityTypeRequest struct {
// Required. The session to create a session entity type for.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The session entity type to create.
SessionEntityType *SessionEntityType `protobuf:"bytes,2,opt,name=session_entity_type,json=sessionEntityType,proto3" json:"session_entity_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateSessionEntityTypeRequest) Reset() { *m = CreateSessionEntityTypeRequest{} }
func (m *CreateSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*CreateSessionEntityTypeRequest) ProtoMessage() {}
func (*CreateSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{4}
}
func (m *CreateSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *CreateSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *CreateSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateSessionEntityTypeRequest.Merge(m, src)
}
func (m *CreateSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Size(m)
}
func (m *CreateSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateSessionEntityTypeRequest proto.InternalMessageInfo
func (m *CreateSessionEntityTypeRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateSessionEntityTypeRequest) GetSessionEntityType() *SessionEntityType {
if m != nil {
return m.SessionEntityType
}
return nil
}
// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.UpdateSessionEntityType].
type UpdateSessionEntityTypeRequest struct {
// Required. The entity type to update. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>`.
SessionEntityType *SessionEntityType `protobuf:"bytes,1,opt,name=session_entity_type,json=sessionEntityType,proto3" json:"session_entity_type,omitempty"`
// Optional. The mask to control which fields get updated.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateSessionEntityTypeRequest) Reset() { *m = UpdateSessionEntityTypeRequest{} }
func (m *UpdateSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateSessionEntityTypeRequest) ProtoMessage() {}
func (*UpdateSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{5}
}
func (m *UpdateSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateSessionEntityTypeRequest.Merge(m, src)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Size(m)
}
func (m *UpdateSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateSessionEntityTypeRequest proto.InternalMessageInfo
func (m *UpdateSessionEntityTypeRequest) GetSessionEntityType() *SessionEntityType {
if m != nil {
return m.SessionEntityType
}
return nil
}
func (m *UpdateSessionEntityTypeRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2.SessionEntityTypes.DeleteSessionEntityType].
type DeleteSessionEntityTypeRequest struct {
// Required. The name of the entity type to delete. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteSessionEntityTypeRequest) Reset() { *m = DeleteSessionEntityTypeRequest{} }
func (m *DeleteSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSessionEntityTypeRequest) ProtoMessage() {}
func (*DeleteSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_841e168133818181, []int{6}
}
func (m *DeleteSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteSessionEntityTypeRequest.Merge(m, src)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Size(m)
}
func (m *DeleteSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteSessionEntityTypeRequest proto.InternalMessageInfo
func (m *DeleteSessionEntityTypeRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.dialogflow.v2.SessionEntityType_EntityOverrideMode", SessionEntityType_EntityOverrideMode_name, SessionEntityType_EntityOverrideMode_value)
proto.RegisterType((*SessionEntityType)(nil), "google.cloud.dialogflow.v2.SessionEntityType")
proto.RegisterType((*ListSessionEntityTypesRequest)(nil), "google.cloud.dialogflow.v2.ListSessionEntityTypesRequest")
proto.RegisterType((*ListSessionEntityTypesResponse)(nil), "google.cloud.dialogflow.v2.ListSessionEntityTypesResponse")
proto.RegisterType((*GetSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2.GetSessionEntityTypeRequest")
proto.RegisterType((*CreateSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2.CreateSessionEntityTypeRequest")
proto.RegisterType((*UpdateSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2.UpdateSessionEntityTypeRequest")
proto.RegisterType((*DeleteSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2.DeleteSessionEntityTypeRequest")
}
// 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
// SessionEntityTypesClient is the client API for SessionEntityTypes service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SessionEntityTypesClient interface {
// Returns the list of all session entity types in the specified session.
ListSessionEntityTypes(ctx context.Context, in *ListSessionEntityTypesRequest, opts ...grpc.CallOption) (*ListSessionEntityTypesResponse, error)
// Retrieves the specified session entity type.
GetSessionEntityType(ctx context.Context, in *GetSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Creates a session entity type.
CreateSessionEntityType(ctx context.Context, in *CreateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Updates the specified session entity type.
UpdateSessionEntityType(ctx context.Context, in *UpdateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Deletes the specified session entity type.
DeleteSessionEntityType(ctx context.Context, in *DeleteSessionEntityTypeRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type sessionEntityTypesClient struct {
cc *grpc.ClientConn
}
func NewSessionEntityTypesClient(cc *grpc.ClientConn) SessionEntityTypesClient {
return &sessionEntityTypesClient{cc}
}
func (c *sessionEntityTypesClient) ListSessionEntityTypes(ctx context.Context, in *ListSessionEntityTypesRequest, opts ...grpc.CallOption) (*ListSessionEntityTypesResponse, error) {
out := new(ListSessionEntityTypesResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) GetSessionEntityType(ctx context.Context, in *GetSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.SessionEntityTypes/GetSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) CreateSessionEntityType(ctx context.Context, in *CreateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) UpdateSessionEntityType(ctx context.Context, in *UpdateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) DeleteSessionEntityType(ctx context.Context, in *DeleteSessionEntityTypeRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SessionEntityTypesServer is the server API for SessionEntityTypes service.
type SessionEntityTypesServer interface {
// Returns the list of all session entity types in the specified session.
ListSessionEntityTypes(context.Context, *ListSessionEntityTypesRequest) (*ListSessionEntityTypesResponse, error)
// Retrieves the specified session entity type.
GetSessionEntityType(context.Context, *GetSessionEntityTypeRequest) (*SessionEntityType, error)
// Creates a session entity type.
CreateSessionEntityType(context.Context, *CreateSessionEntityTypeRequest) (*SessionEntityType, error)
// Updates the specified session entity type.
UpdateSessionEntityType(context.Context, *UpdateSessionEntityTypeRequest) (*SessionEntityType, error)
// Deletes the specified session entity type.
DeleteSessionEntityType(context.Context, *DeleteSessionEntityTypeRequest) (*empty.Empty, error)
}
func RegisterSessionEntityTypesServer(s *grpc.Server, srv SessionEntityTypesServer) {
s.RegisterService(&_SessionEntityTypes_serviceDesc, srv)
}
func _SessionEntityTypes_ListSessionEntityTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSessionEntityTypesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).ListSessionEntityTypes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.SessionEntityTypes/ListSessionEntityTypes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).ListSessionEntityTypes(ctx, req.(*ListSessionEntityTypesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_GetSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).GetSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.SessionEntityTypes/GetSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).GetSessionEntityType(ctx, req.(*GetSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_CreateSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).CreateSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.SessionEntityTypes/CreateSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).CreateSessionEntityType(ctx, req.(*CreateSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_UpdateSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).UpdateSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.SessionEntityTypes/UpdateSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).UpdateSessionEntityType(ctx, req.(*UpdateSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_DeleteSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).DeleteSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2.SessionEntityTypes/DeleteSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).DeleteSessionEntityType(ctx, req.(*DeleteSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SessionEntityTypes_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2.SessionEntityTypes",
HandlerType: (*SessionEntityTypesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListSessionEntityTypes",
Handler: _SessionEntityTypes_ListSessionEntityTypes_Handler,
},
{
MethodName: "GetSessionEntityType",
Handler: _SessionEntityTypes_GetSessionEntityType_Handler,
},
{
MethodName: "CreateSessionEntityType",
Handler: _SessionEntityTypes_CreateSessionEntityType_Handler,
},
{
MethodName: "UpdateSessionEntityType",
Handler: _SessionEntityTypes_UpdateSessionEntityType_Handler,
},
{
MethodName: "DeleteSessionEntityType",
Handler: _SessionEntityTypes_DeleteSessionEntityType_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2/session_entity_type.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2/session_entity_type.proto", fileDescriptor_841e168133818181)
}
var fileDescriptor_841e168133818181 = []byte{
// 793 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xdf, 0x4e, 0xd4, 0x4a,
0x18, 0x3f, 0x53, 0xce, 0x21, 0x30, 0xe4, 0x9c, 0x03, 0x73, 0xc8, 0xb2, 0x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57, 0xa2, 0x70, 0x4b,
0x1c, 0x44, 0xe5, 0x14, 0xc4, 0x66, 0x79, 0x6b, 0x98, 0x47, 0xbd, 0xf5, 0x33, 0x00, 0x00, 0xff,
0xff, 0x3d, 0x82, 0x36, 0x5e, 0xfa, 0x09, 0x00, 0x00,
}

View file

@ -0,0 +1,309 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2/webhook.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// The request message for a webhook call.
type WebhookRequest struct {
// The unique identifier of detectIntent request session.
// Can be used to identify end-user inside webhook implementation.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Session string `protobuf:"bytes,4,opt,name=session,proto3" json:"session,omitempty"`
// The unique identifier of the response. Contains the same value as
// `[Streaming]DetectIntentResponse.response_id`.
ResponseId string `protobuf:"bytes,1,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
// The result of the conversational query or event processing. Contains the
// same value as `[Streaming]DetectIntentResponse.query_result`.
QueryResult *QueryResult `protobuf:"bytes,2,opt,name=query_result,json=queryResult,proto3" json:"query_result,omitempty"`
// Optional. The contents of the original request that was passed to
// `[Streaming]DetectIntent` call.
OriginalDetectIntentRequest *OriginalDetectIntentRequest `protobuf:"bytes,3,opt,name=original_detect_intent_request,json=originalDetectIntentRequest,proto3" json:"original_detect_intent_request,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebhookRequest) Reset() { *m = WebhookRequest{} }
func (m *WebhookRequest) String() string { return proto.CompactTextString(m) }
func (*WebhookRequest) ProtoMessage() {}
func (*WebhookRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2ba880626f278d96, []int{0}
}
func (m *WebhookRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebhookRequest.Unmarshal(m, b)
}
func (m *WebhookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebhookRequest.Marshal(b, m, deterministic)
}
func (m *WebhookRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebhookRequest.Merge(m, src)
}
func (m *WebhookRequest) XXX_Size() int {
return xxx_messageInfo_WebhookRequest.Size(m)
}
func (m *WebhookRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WebhookRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WebhookRequest proto.InternalMessageInfo
func (m *WebhookRequest) GetSession() string {
if m != nil {
return m.Session
}
return ""
}
func (m *WebhookRequest) GetResponseId() string {
if m != nil {
return m.ResponseId
}
return ""
}
func (m *WebhookRequest) GetQueryResult() *QueryResult {
if m != nil {
return m.QueryResult
}
return nil
}
func (m *WebhookRequest) GetOriginalDetectIntentRequest() *OriginalDetectIntentRequest {
if m != nil {
return m.OriginalDetectIntentRequest
}
return nil
}
// The response message for a webhook call.
type WebhookResponse struct {
// Optional. The text to be shown on the screen. This value is passed directly
// to `QueryResult.fulfillment_text`.
FulfillmentText string `protobuf:"bytes,1,opt,name=fulfillment_text,json=fulfillmentText,proto3" json:"fulfillment_text,omitempty"`
// Optional. The collection of rich messages to present to the user. This
// value is passed directly to `QueryResult.fulfillment_messages`.
FulfillmentMessages []*Intent_Message `protobuf:"bytes,2,rep,name=fulfillment_messages,json=fulfillmentMessages,proto3" json:"fulfillment_messages,omitempty"`
// Optional. This value is passed directly to `QueryResult.webhook_source`.
Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
// Optional. This value is passed directly to `QueryResult.webhook_payload`.
// See the related `fulfillment_messages[i].payload field`, which may be used
// as an alternative to this field.
//
// This field can be used for Actions on Google responses.
// It should have a structure similar to the JSON message shown here. For more
// information, see
// [Actions on Google Webhook
// Format](https://developers.google.com/actions/dialogflow/webhook)
// <pre>{
// "google": {
// "expectUserResponse": true,
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "textToSpeech": "this is a simple response"
// }
// }
// ]
// }
// }
// }</pre>
Payload *_struct.Struct `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
// Optional. The collection of output contexts. This value is passed directly
// to `QueryResult.output_contexts`.
OutputContexts []*Context `protobuf:"bytes,5,rep,name=output_contexts,json=outputContexts,proto3" json:"output_contexts,omitempty"`
// Optional. Makes the platform immediately invoke another `DetectIntent` call
// internally with the specified event as input.
FollowupEventInput *EventInput `protobuf:"bytes,6,opt,name=followup_event_input,json=followupEventInput,proto3" json:"followup_event_input,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebhookResponse) Reset() { *m = WebhookResponse{} }
func (m *WebhookResponse) String() string { return proto.CompactTextString(m) }
func (*WebhookResponse) ProtoMessage() {}
func (*WebhookResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_2ba880626f278d96, []int{1}
}
func (m *WebhookResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebhookResponse.Unmarshal(m, b)
}
func (m *WebhookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebhookResponse.Marshal(b, m, deterministic)
}
func (m *WebhookResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebhookResponse.Merge(m, src)
}
func (m *WebhookResponse) XXX_Size() int {
return xxx_messageInfo_WebhookResponse.Size(m)
}
func (m *WebhookResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WebhookResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WebhookResponse proto.InternalMessageInfo
func (m *WebhookResponse) GetFulfillmentText() string {
if m != nil {
return m.FulfillmentText
}
return ""
}
func (m *WebhookResponse) GetFulfillmentMessages() []*Intent_Message {
if m != nil {
return m.FulfillmentMessages
}
return nil
}
func (m *WebhookResponse) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *WebhookResponse) GetPayload() *_struct.Struct {
if m != nil {
return m.Payload
}
return nil
}
func (m *WebhookResponse) GetOutputContexts() []*Context {
if m != nil {
return m.OutputContexts
}
return nil
}
func (m *WebhookResponse) GetFollowupEventInput() *EventInput {
if m != nil {
return m.FollowupEventInput
}
return nil
}
// Represents the contents of the original request that was passed to
// the `[Streaming]DetectIntent` call.
type OriginalDetectIntentRequest struct {
// The source of this request, e.g., `google`, `facebook`, `slack`. It is set
// by Dialogflow-owned servers.
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
// Optional. This field is set to the value of `QueryParameters.payload` field
// passed in the request.
Payload *_struct.Struct `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OriginalDetectIntentRequest) Reset() { *m = OriginalDetectIntentRequest{} }
func (m *OriginalDetectIntentRequest) String() string { return proto.CompactTextString(m) }
func (*OriginalDetectIntentRequest) ProtoMessage() {}
func (*OriginalDetectIntentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2ba880626f278d96, []int{2}
}
func (m *OriginalDetectIntentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OriginalDetectIntentRequest.Unmarshal(m, b)
}
func (m *OriginalDetectIntentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OriginalDetectIntentRequest.Marshal(b, m, deterministic)
}
func (m *OriginalDetectIntentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_OriginalDetectIntentRequest.Merge(m, src)
}
func (m *OriginalDetectIntentRequest) XXX_Size() int {
return xxx_messageInfo_OriginalDetectIntentRequest.Size(m)
}
func (m *OriginalDetectIntentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_OriginalDetectIntentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_OriginalDetectIntentRequest proto.InternalMessageInfo
func (m *OriginalDetectIntentRequest) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *OriginalDetectIntentRequest) GetPayload() *_struct.Struct {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*WebhookRequest)(nil), "google.cloud.dialogflow.v2.WebhookRequest")
proto.RegisterType((*WebhookResponse)(nil), "google.cloud.dialogflow.v2.WebhookResponse")
proto.RegisterType((*OriginalDetectIntentRequest)(nil), "google.cloud.dialogflow.v2.OriginalDetectIntentRequest")
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2/webhook.proto", fileDescriptor_2ba880626f278d96)
}
var fileDescriptor_2ba880626f278d96 = []byte{
// 536 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xc1, 0x6f, 0xd3, 0x30,
0x14, 0xc6, 0x95, 0x14, 0x3a, 0xcd, 0x9d, 0x56, 0x64, 0x26, 0x88, 0x3a, 0x34, 0xaa, 0x22, 0xb1,
0xc2, 0x21, 0x11, 0xe1, 0xc0, 0x81, 0xdb, 0x56, 0x40, 0x45, 0x20, 0x46, 0x40, 0x80, 0x90, 0x50,
0x94, 0x26, 0x6e, 0x66, 0xe1, 0xfa, 0xa5, 0xb1, 0xdd, 0x6e, 0x12, 0x7f, 0x03, 0x37, 0x4e, 0xdc,
0x38, 0xf2, 0x17, 0x72, 0x44, 0xb1, 0x1d, 0xd2, 0x03, 0x8d, 0x76, 0x7c, 0xf6, 0xe7, 0xdf, 0xfb,
0xde, 0xf7, 0x12, 0x34, 0xce, 0x01, 0x72, 0x46, 0x82, 0x94, 0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52, 0x58, 0xb4, 0x78, 0x3d,
0xd9, 0xb3, 0x9f, 0xc6, 0x59, 0xc5, 0x38, 0x73, 0x3e, 0x4f, 0xac, 0x36, 0x07, 0x96, 0xf0, 0xdc,
0x87, 0x32, 0x0f, 0x72, 0xc2, 0x75, 0x87, 0xc0, 0x5c, 0x25, 0x05, 0x15, 0xff, 0xfb, 0x59, 0x9f,
0x36, 0xd5, 0x1f, 0xc7, 0xf9, 0xe5, 0xba, 0x93, 0xe7, 0xbf, 0xdd, 0xc1, 0x0b, 0x83, 0x3b, 0xd5,
0xad, 0x27, 0x4d, 0xeb, 0x0f, 0xe1, 0xac, 0xab, 0xa9, 0x8f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff,
0x75, 0x98, 0x13, 0x07, 0xb8, 0x04, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,366 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/audio_config.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
type SsmlVoiceGender int32
const (
// An unspecified gender, which means that the client doesn't care which
// gender the selected voice will have.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0
// A male voice.
SsmlVoiceGender_SSML_VOICE_GENDER_MALE SsmlVoiceGender = 1
// A female voice.
SsmlVoiceGender_SSML_VOICE_GENDER_FEMALE SsmlVoiceGender = 2
// A gender-neutral voice.
SsmlVoiceGender_SSML_VOICE_GENDER_NEUTRAL SsmlVoiceGender = 3
)
var SsmlVoiceGender_name = map[int32]string{
0: "SSML_VOICE_GENDER_UNSPECIFIED",
1: "SSML_VOICE_GENDER_MALE",
2: "SSML_VOICE_GENDER_FEMALE",
3: "SSML_VOICE_GENDER_NEUTRAL",
}
var SsmlVoiceGender_value = map[string]int32{
"SSML_VOICE_GENDER_UNSPECIFIED": 0,
"SSML_VOICE_GENDER_MALE": 1,
"SSML_VOICE_GENDER_FEMALE": 2,
"SSML_VOICE_GENDER_NEUTRAL": 3,
}
func (x SsmlVoiceGender) String() string {
return proto.EnumName(SsmlVoiceGender_name, int32(x))
}
func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_80617ff5f6b0e1c6, []int{0}
}
// Audio encoding of the output audio format in Text-To-Speech.
type OutputAudioEncoding int32
const (
// Not specified.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_UNSPECIFIED OutputAudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
// Audio content returned as LINEAR16 also contains a WAV header.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_LINEAR_16 OutputAudioEncoding = 1
// MP3 audio.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_MP3 OutputAudioEncoding = 2
// Opus encoded audio wrapped in an ogg container. The result will be a
// file which can be played natively on Android, and in browsers (at least
// Chrome and Firefox). The quality of the encoding is considerably higher
// than MP3 while using approximately the same bitrate.
OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_OGG_OPUS OutputAudioEncoding = 3
)
var OutputAudioEncoding_name = map[int32]string{
0: "OUTPUT_AUDIO_ENCODING_UNSPECIFIED",
1: "OUTPUT_AUDIO_ENCODING_LINEAR_16",
2: "OUTPUT_AUDIO_ENCODING_MP3",
3: "OUTPUT_AUDIO_ENCODING_OGG_OPUS",
}
var OutputAudioEncoding_value = map[string]int32{
"OUTPUT_AUDIO_ENCODING_UNSPECIFIED": 0,
"OUTPUT_AUDIO_ENCODING_LINEAR_16": 1,
"OUTPUT_AUDIO_ENCODING_MP3": 2,
"OUTPUT_AUDIO_ENCODING_OGG_OPUS": 3,
}
func (x OutputAudioEncoding) String() string {
return proto.EnumName(OutputAudioEncoding_name, int32(x))
}
func (OutputAudioEncoding) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_80617ff5f6b0e1c6, []int{1}
}
// Description of which voice to use for speech synthesis.
type VoiceSelectionParams struct {
// Optional. The name of the voice. If not set, the service will choose a
// voice based on the other parameters such as language_code and gender.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. The preferred gender of the voice. If not set, the service will
// choose a voice based on the other parameters such as language_code and
// name. Note that this is only a preference, not requirement. If a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlGender SsmlVoiceGender `protobuf:"varint,2,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.dialogflow.v2beta1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoiceSelectionParams) Reset() { *m = VoiceSelectionParams{} }
func (m *VoiceSelectionParams) String() string { return proto.CompactTextString(m) }
func (*VoiceSelectionParams) ProtoMessage() {}
func (*VoiceSelectionParams) Descriptor() ([]byte, []int) {
return fileDescriptor_80617ff5f6b0e1c6, []int{0}
}
func (m *VoiceSelectionParams) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoiceSelectionParams.Unmarshal(m, b)
}
func (m *VoiceSelectionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoiceSelectionParams.Marshal(b, m, deterministic)
}
func (m *VoiceSelectionParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoiceSelectionParams.Merge(m, src)
}
func (m *VoiceSelectionParams) XXX_Size() int {
return xxx_messageInfo_VoiceSelectionParams.Size(m)
}
func (m *VoiceSelectionParams) XXX_DiscardUnknown() {
xxx_messageInfo_VoiceSelectionParams.DiscardUnknown(m)
}
var xxx_messageInfo_VoiceSelectionParams proto.InternalMessageInfo
func (m *VoiceSelectionParams) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender {
if m != nil {
return m.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
// Configuration of how speech should be synthesized.
type SynthesizeSpeechConfig struct {
// Optional. Speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
// native speed supported by the specific voice. 2.0 is twice as fast, and
// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
// other values < 0.25 or > 4.0 will return an error.
SpeakingRate float64 `protobuf:"fixed64,1,opt,name=speaking_rate,json=speakingRate,proto3" json:"speaking_rate,omitempty"`
// Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
// semitones from the original pitch. -20 means decrease 20 semitones from the
// original pitch.
Pitch float64 `protobuf:"fixed64,2,opt,name=pitch,proto3" json:"pitch,omitempty"`
// Optional. Volume gain (in dB) of the normal native volume supported by the
// specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
// 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
// will play at approximately half the amplitude of the normal native signal
// amplitude. A value of +6.0 (dB) will play at approximately twice the
// amplitude of the normal native signal amplitude. We strongly recommend not
// to exceed +10 (dB) as there's usually no effective increase in loudness for
// any value greater than that.
VolumeGainDb float64 `protobuf:"fixed64,3,opt,name=volume_gain_db,json=volumeGainDb,proto3" json:"volume_gain_db,omitempty"`
// Optional. An identifier which selects 'audio effects' profiles that are
// applied on (post synthesized) text to speech. Effects are applied on top of
// each other in the order they are given.
EffectsProfileId []string `protobuf:"bytes,5,rep,name=effects_profile_id,json=effectsProfileId,proto3" json:"effects_profile_id,omitempty"`
// Optional. The desired voice of the synthesized audio.
Voice *VoiceSelectionParams `protobuf:"bytes,4,opt,name=voice,proto3" json:"voice,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesizeSpeechConfig) Reset() { *m = SynthesizeSpeechConfig{} }
func (m *SynthesizeSpeechConfig) String() string { return proto.CompactTextString(m) }
func (*SynthesizeSpeechConfig) ProtoMessage() {}
func (*SynthesizeSpeechConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_80617ff5f6b0e1c6, []int{1}
}
func (m *SynthesizeSpeechConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesizeSpeechConfig.Unmarshal(m, b)
}
func (m *SynthesizeSpeechConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesizeSpeechConfig.Marshal(b, m, deterministic)
}
func (m *SynthesizeSpeechConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesizeSpeechConfig.Merge(m, src)
}
func (m *SynthesizeSpeechConfig) XXX_Size() int {
return xxx_messageInfo_SynthesizeSpeechConfig.Size(m)
}
func (m *SynthesizeSpeechConfig) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesizeSpeechConfig.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesizeSpeechConfig proto.InternalMessageInfo
func (m *SynthesizeSpeechConfig) GetSpeakingRate() float64 {
if m != nil {
return m.SpeakingRate
}
return 0
}
func (m *SynthesizeSpeechConfig) GetPitch() float64 {
if m != nil {
return m.Pitch
}
return 0
}
func (m *SynthesizeSpeechConfig) GetVolumeGainDb() float64 {
if m != nil {
return m.VolumeGainDb
}
return 0
}
func (m *SynthesizeSpeechConfig) GetEffectsProfileId() []string {
if m != nil {
return m.EffectsProfileId
}
return nil
}
func (m *SynthesizeSpeechConfig) GetVoice() *VoiceSelectionParams {
if m != nil {
return m.Voice
}
return nil
}
// Instructs the speech synthesizer how to generate the output audio content.
type OutputAudioConfig struct {
// Required. Audio encoding of the synthesized audio content.
AudioEncoding OutputAudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.dialogflow.v2beta1.OutputAudioEncoding" json:"audio_encoding,omitempty"`
// Optional. The synthesis sample rate (in hertz) for this audio. If not
// provided, then the synthesizer will use the default sample rate based on
// the audio encoding. If this is different from the voice's natural sample
// rate, then the synthesizer will honor this request by converting to the
// desired sample rate (which might result in worse audio quality).
SampleRateHertz int32 `protobuf:"varint,2,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
// Optional. Configuration of how speech should be synthesized.
SynthesizeSpeechConfig *SynthesizeSpeechConfig `protobuf:"bytes,3,opt,name=synthesize_speech_config,json=synthesizeSpeechConfig,proto3" json:"synthesize_speech_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OutputAudioConfig) Reset() { *m = OutputAudioConfig{} }
func (m *OutputAudioConfig) String() string { return proto.CompactTextString(m) }
func (*OutputAudioConfig) ProtoMessage() {}
func (*OutputAudioConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_80617ff5f6b0e1c6, []int{2}
}
func (m *OutputAudioConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OutputAudioConfig.Unmarshal(m, b)
}
func (m *OutputAudioConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OutputAudioConfig.Marshal(b, m, deterministic)
}
func (m *OutputAudioConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_OutputAudioConfig.Merge(m, src)
}
func (m *OutputAudioConfig) XXX_Size() int {
return xxx_messageInfo_OutputAudioConfig.Size(m)
}
func (m *OutputAudioConfig) XXX_DiscardUnknown() {
xxx_messageInfo_OutputAudioConfig.DiscardUnknown(m)
}
var xxx_messageInfo_OutputAudioConfig proto.InternalMessageInfo
func (m *OutputAudioConfig) GetAudioEncoding() OutputAudioEncoding {
if m != nil {
return m.AudioEncoding
}
return OutputAudioEncoding_OUTPUT_AUDIO_ENCODING_UNSPECIFIED
}
func (m *OutputAudioConfig) GetSampleRateHertz() int32 {
if m != nil {
return m.SampleRateHertz
}
return 0
}
func (m *OutputAudioConfig) GetSynthesizeSpeechConfig() *SynthesizeSpeechConfig {
if m != nil {
return m.SynthesizeSpeechConfig
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.dialogflow.v2beta1.SsmlVoiceGender", SsmlVoiceGender_name, SsmlVoiceGender_value)
proto.RegisterEnum("google.cloud.dialogflow.v2beta1.OutputAudioEncoding", OutputAudioEncoding_name, OutputAudioEncoding_value)
proto.RegisterType((*VoiceSelectionParams)(nil), "google.cloud.dialogflow.v2beta1.VoiceSelectionParams")
proto.RegisterType((*SynthesizeSpeechConfig)(nil), "google.cloud.dialogflow.v2beta1.SynthesizeSpeechConfig")
proto.RegisterType((*OutputAudioConfig)(nil), "google.cloud.dialogflow.v2beta1.OutputAudioConfig")
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/audio_config.proto", fileDescriptor_80617ff5f6b0e1c6)
}
var fileDescriptor_80617ff5f6b0e1c6 = []byte{
// 647 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x54, 0x4f, 0x6f, 0xd3, 0x3e,
0x18, 0xfe, 0xb9, 0x5d, 0x7f, 0xd2, 0x3c, 0xd6, 0x65, 0x66, 0x9a, 0xca, 0xb4, 0xb1, 0xae, 0x03,
0xa9, 0x9a, 0x50, 0xcb, 0x3a, 0xfe, 0x1c, 0x38, 0x75, 0x6d, 0x56, 0x22, 0xba, 0x26, 0x24, 0xeb,
0x0e, 0x70, 0xb0, 0xdc, 0xc4, 0x4d, 0x2d, 0x12, 0x3b, 0x24, 0xe9, 0x10, 0x93, 0xf8, 0x08, 0x88,
0xef, 0x80, 0x38, 0x71, 0xe0, 0xd3, 0x71, 0xe0,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 0xe4, 0x5c, 0x91, 0x26, 0xff, 0xcb, 0xfe, 0x47, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x18,
0xb5, 0x45, 0x5e, 0xeb, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,778 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/context.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// Represents a context.
type Context struct {
// Required. The unique identifier of the context. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`,
// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>/contexts/<Context ID>`. The `Context ID` is
// always converted to lowercase. If `Environment ID` is not specified, we
// assume default 'draft' environment. If `User ID` is not specified, we
// assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. The number of conversational query requests after which the
// context expires. If set to `0` (the default) the context expires
// immediately. Contexts expire automatically after 10 minutes even if there
// are no matching queries.
LifespanCount int32 `protobuf:"varint,2,opt,name=lifespan_count,json=lifespanCount,proto3" json:"lifespan_count,omitempty"`
// Optional. The collection of parameters associated with this context.
// Refer to [this doc](https://dialogflow.com/docs/actions-and-parameters) for
// syntax.
Parameters *_struct.Struct `protobuf:"bytes,3,opt,name=parameters,proto3" json:"parameters,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Context) Reset() { *m = Context{} }
func (m *Context) String() string { return proto.CompactTextString(m) }
func (*Context) ProtoMessage() {}
func (*Context) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{0}
}
func (m *Context) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Context.Unmarshal(m, b)
}
func (m *Context) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Context.Marshal(b, m, deterministic)
}
func (m *Context) XXX_Merge(src proto.Message) {
xxx_messageInfo_Context.Merge(m, src)
}
func (m *Context) XXX_Size() int {
return xxx_messageInfo_Context.Size(m)
}
func (m *Context) XXX_DiscardUnknown() {
xxx_messageInfo_Context.DiscardUnknown(m)
}
var xxx_messageInfo_Context proto.InternalMessageInfo
func (m *Context) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Context) GetLifespanCount() int32 {
if m != nil {
return m.LifespanCount
}
return 0
}
func (m *Context) GetParameters() *_struct.Struct {
if m != nil {
return m.Parameters
}
return nil
}
// The request message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
type ListContextsRequest struct {
// Required. The session to list all contexts from.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
// default 'draft' environment. If `User ID` is not specified, we assume
// default '-' user.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 100 and at most 1000.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListContextsRequest) Reset() { *m = ListContextsRequest{} }
func (m *ListContextsRequest) String() string { return proto.CompactTextString(m) }
func (*ListContextsRequest) ProtoMessage() {}
func (*ListContextsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{1}
}
func (m *ListContextsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListContextsRequest.Unmarshal(m, b)
}
func (m *ListContextsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListContextsRequest.Marshal(b, m, deterministic)
}
func (m *ListContextsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListContextsRequest.Merge(m, src)
}
func (m *ListContextsRequest) XXX_Size() int {
return xxx_messageInfo_ListContextsRequest.Size(m)
}
func (m *ListContextsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListContextsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListContextsRequest proto.InternalMessageInfo
func (m *ListContextsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListContextsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListContextsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The response message for [Contexts.ListContexts][google.cloud.dialogflow.v2beta1.Contexts.ListContexts].
type ListContextsResponse struct {
// The list of contexts. There will be a maximum number of items
// returned based on the page_size field in the request.
Contexts []*Context `protobuf:"bytes,1,rep,name=contexts,proto3" json:"contexts,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListContextsResponse) Reset() { *m = ListContextsResponse{} }
func (m *ListContextsResponse) String() string { return proto.CompactTextString(m) }
func (*ListContextsResponse) ProtoMessage() {}
func (*ListContextsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{2}
}
func (m *ListContextsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListContextsResponse.Unmarshal(m, b)
}
func (m *ListContextsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListContextsResponse.Marshal(b, m, deterministic)
}
func (m *ListContextsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListContextsResponse.Merge(m, src)
}
func (m *ListContextsResponse) XXX_Size() int {
return xxx_messageInfo_ListContextsResponse.Size(m)
}
func (m *ListContextsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListContextsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListContextsResponse proto.InternalMessageInfo
func (m *ListContextsResponse) GetContexts() []*Context {
if m != nil {
return m.Contexts
}
return nil
}
func (m *ListContextsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for [Contexts.GetContext][google.cloud.dialogflow.v2beta1.Contexts.GetContext].
type GetContextRequest struct {
// Required. The name of the context. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
// not specified, we assume default 'draft' environment. If `User ID` is not
// specified, we assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetContextRequest) Reset() { *m = GetContextRequest{} }
func (m *GetContextRequest) String() string { return proto.CompactTextString(m) }
func (*GetContextRequest) ProtoMessage() {}
func (*GetContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{3}
}
func (m *GetContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetContextRequest.Unmarshal(m, b)
}
func (m *GetContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetContextRequest.Marshal(b, m, deterministic)
}
func (m *GetContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetContextRequest.Merge(m, src)
}
func (m *GetContextRequest) XXX_Size() int {
return xxx_messageInfo_GetContextRequest.Size(m)
}
func (m *GetContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetContextRequest proto.InternalMessageInfo
func (m *GetContextRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [Contexts.CreateContext][google.cloud.dialogflow.v2beta1.Contexts.CreateContext].
type CreateContextRequest struct {
// Required. The session to create a context for.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>`. If `Environment ID` is not specified, we assume
// default 'draft' environment. If `User ID` is not specified, we assume
// default '-' user.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The context to create.
Context *Context `protobuf:"bytes,2,opt,name=context,proto3" json:"context,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateContextRequest) Reset() { *m = CreateContextRequest{} }
func (m *CreateContextRequest) String() string { return proto.CompactTextString(m) }
func (*CreateContextRequest) ProtoMessage() {}
func (*CreateContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{4}
}
func (m *CreateContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateContextRequest.Unmarshal(m, b)
}
func (m *CreateContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateContextRequest.Marshal(b, m, deterministic)
}
func (m *CreateContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateContextRequest.Merge(m, src)
}
func (m *CreateContextRequest) XXX_Size() int {
return xxx_messageInfo_CreateContextRequest.Size(m)
}
func (m *CreateContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateContextRequest proto.InternalMessageInfo
func (m *CreateContextRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateContextRequest) GetContext() *Context {
if m != nil {
return m.Context
}
return nil
}
// The request message for [Contexts.UpdateContext][google.cloud.dialogflow.v2beta1.Contexts.UpdateContext].
type UpdateContextRequest struct {
// Required. The context to update.
Context *Context `protobuf:"bytes,1,opt,name=context,proto3" json:"context,omitempty"`
// Optional. The mask to control which fields get updated.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateContextRequest) Reset() { *m = UpdateContextRequest{} }
func (m *UpdateContextRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateContextRequest) ProtoMessage() {}
func (*UpdateContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{5}
}
func (m *UpdateContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateContextRequest.Unmarshal(m, b)
}
func (m *UpdateContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateContextRequest.Marshal(b, m, deterministic)
}
func (m *UpdateContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateContextRequest.Merge(m, src)
}
func (m *UpdateContextRequest) XXX_Size() int {
return xxx_messageInfo_UpdateContextRequest.Size(m)
}
func (m *UpdateContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateContextRequest proto.InternalMessageInfo
func (m *UpdateContextRequest) GetContext() *Context {
if m != nil {
return m.Context
}
return nil
}
func (m *UpdateContextRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// The request message for [Contexts.DeleteContext][google.cloud.dialogflow.v2beta1.Contexts.DeleteContext].
type DeleteContextRequest struct {
// Required. The name of the context to delete. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>`
// or `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>/contexts/<Context ID>`. If `Environment ID` is
// not specified, we assume default 'draft' environment. If `User ID` is not
// specified, we assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteContextRequest) Reset() { *m = DeleteContextRequest{} }
func (m *DeleteContextRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteContextRequest) ProtoMessage() {}
func (*DeleteContextRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{6}
}
func (m *DeleteContextRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteContextRequest.Unmarshal(m, b)
}
func (m *DeleteContextRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteContextRequest.Marshal(b, m, deterministic)
}
func (m *DeleteContextRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteContextRequest.Merge(m, src)
}
func (m *DeleteContextRequest) XXX_Size() int {
return xxx_messageInfo_DeleteContextRequest.Size(m)
}
func (m *DeleteContextRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteContextRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteContextRequest proto.InternalMessageInfo
func (m *DeleteContextRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [Contexts.DeleteAllContexts][google.cloud.dialogflow.v2beta1.Contexts.DeleteAllContexts].
type DeleteAllContextsRequest struct {
// Required. The name of the session to delete all contexts from. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>` or `projects/<Project
// ID>/agent/environments/<Environment ID>/users/<User ID>/sessions/<Session
// ID>`. If `Environment ID` is not specified we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteAllContextsRequest) Reset() { *m = DeleteAllContextsRequest{} }
func (m *DeleteAllContextsRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteAllContextsRequest) ProtoMessage() {}
func (*DeleteAllContextsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ff2c900db64d4fc9, []int{7}
}
func (m *DeleteAllContextsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteAllContextsRequest.Unmarshal(m, b)
}
func (m *DeleteAllContextsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteAllContextsRequest.Marshal(b, m, deterministic)
}
func (m *DeleteAllContextsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteAllContextsRequest.Merge(m, src)
}
func (m *DeleteAllContextsRequest) XXX_Size() int {
return xxx_messageInfo_DeleteAllContextsRequest.Size(m)
}
func (m *DeleteAllContextsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteAllContextsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteAllContextsRequest proto.InternalMessageInfo
func (m *DeleteAllContextsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func init() {
proto.RegisterType((*Context)(nil), "google.cloud.dialogflow.v2beta1.Context")
proto.RegisterType((*ListContextsRequest)(nil), "google.cloud.dialogflow.v2beta1.ListContextsRequest")
proto.RegisterType((*ListContextsResponse)(nil), "google.cloud.dialogflow.v2beta1.ListContextsResponse")
proto.RegisterType((*GetContextRequest)(nil), "google.cloud.dialogflow.v2beta1.GetContextRequest")
proto.RegisterType((*CreateContextRequest)(nil), "google.cloud.dialogflow.v2beta1.CreateContextRequest")
proto.RegisterType((*UpdateContextRequest)(nil), "google.cloud.dialogflow.v2beta1.UpdateContextRequest")
proto.RegisterType((*DeleteContextRequest)(nil), "google.cloud.dialogflow.v2beta1.DeleteContextRequest")
proto.RegisterType((*DeleteAllContextsRequest)(nil), "google.cloud.dialogflow.v2beta1.DeleteAllContextsRequest")
}
// 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
// ContextsClient is the client API for Contexts service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ContextsClient interface {
// Returns the list of all contexts in the specified session.
ListContexts(ctx context.Context, in *ListContextsRequest, opts ...grpc.CallOption) (*ListContextsResponse, error)
// Retrieves the specified context.
GetContext(ctx context.Context, in *GetContextRequest, opts ...grpc.CallOption) (*Context, error)
// Creates a context.
CreateContext(ctx context.Context, in *CreateContextRequest, opts ...grpc.CallOption) (*Context, error)
// Updates the specified context.
UpdateContext(ctx context.Context, in *UpdateContextRequest, opts ...grpc.CallOption) (*Context, error)
// Deletes the specified context.
DeleteContext(ctx context.Context, in *DeleteContextRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Deletes all active contexts in the specified session.
DeleteAllContexts(ctx context.Context, in *DeleteAllContextsRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type contextsClient struct {
cc *grpc.ClientConn
}
func NewContextsClient(cc *grpc.ClientConn) ContextsClient {
return &contextsClient{cc}
}
func (c *contextsClient) ListContexts(ctx context.Context, in *ListContextsRequest, opts ...grpc.CallOption) (*ListContextsResponse, error) {
out := new(ListContextsResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/ListContexts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) GetContext(ctx context.Context, in *GetContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/GetContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) CreateContext(ctx context.Context, in *CreateContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/CreateContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) UpdateContext(ctx context.Context, in *UpdateContextRequest, opts ...grpc.CallOption) (*Context, error) {
out := new(Context)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/UpdateContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) DeleteContext(ctx context.Context, in *DeleteContextRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/DeleteContext", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *contextsClient) DeleteAllContexts(ctx context.Context, in *DeleteAllContextsRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Contexts/DeleteAllContexts", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ContextsServer is the server API for Contexts service.
type ContextsServer interface {
// Returns the list of all contexts in the specified session.
ListContexts(context.Context, *ListContextsRequest) (*ListContextsResponse, error)
// Retrieves the specified context.
GetContext(context.Context, *GetContextRequest) (*Context, error)
// Creates a context.
CreateContext(context.Context, *CreateContextRequest) (*Context, error)
// Updates the specified context.
UpdateContext(context.Context, *UpdateContextRequest) (*Context, error)
// Deletes the specified context.
DeleteContext(context.Context, *DeleteContextRequest) (*empty.Empty, error)
// Deletes all active contexts in the specified session.
DeleteAllContexts(context.Context, *DeleteAllContextsRequest) (*empty.Empty, error)
}
func RegisterContextsServer(s *grpc.Server, srv ContextsServer) {
s.RegisterService(&_Contexts_serviceDesc, srv)
}
func _Contexts_ListContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListContextsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).ListContexts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/ListContexts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).ListContexts(ctx, req.(*ListContextsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_GetContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).GetContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/GetContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).GetContext(ctx, req.(*GetContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_CreateContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).CreateContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/CreateContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).CreateContext(ctx, req.(*CreateContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_UpdateContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).UpdateContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/UpdateContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).UpdateContext(ctx, req.(*UpdateContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_DeleteContext_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteContextRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).DeleteContext(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/DeleteContext",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).DeleteContext(ctx, req.(*DeleteContextRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Contexts_DeleteAllContexts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteAllContextsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ContextsServer).DeleteAllContexts(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Contexts/DeleteAllContexts",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ContextsServer).DeleteAllContexts(ctx, req.(*DeleteAllContextsRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Contexts_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2beta1.Contexts",
HandlerType: (*ContextsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListContexts",
Handler: _Contexts_ListContexts_Handler,
},
{
MethodName: "GetContext",
Handler: _Contexts_GetContext_Handler,
},
{
MethodName: "CreateContext",
Handler: _Contexts_CreateContext_Handler,
},
{
MethodName: "UpdateContext",
Handler: _Contexts_UpdateContext_Handler,
},
{
MethodName: "DeleteContext",
Handler: _Contexts_DeleteContext_Handler,
},
{
MethodName: "DeleteAllContexts",
Handler: _Contexts_DeleteAllContexts_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2beta1/context.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/context.proto", fileDescriptor_ff2c900db64d4fc9)
}
var fileDescriptor_ff2c900db64d4fc9 = []byte{
// 807 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6b, 0xdb, 0x48,
0x14, 0x66, 0x94, 0xdd, 0xfc, 0x98, 0xc4, 0xbb, 0x64, 0xd6, 0x64, 0x8d, 0x93, 0x25, 0x46, 0xcb,
0xee, 0x1a, 0xc3, 0x4a, 0xac, 0xf6, 0x17, 0xbb, 0x61, 0x17, 0x1a, 0xbb, 0x09, 0x85, 0x86, 0x06,
0xa7, 0x29, 0x25, 0x17, 0x77, 0x62, 0x3f, 0x0b, 0x35, 0xf2, 0x8c, 0xaa, 0x19, 0xa7, 0x69, 0x4a,
0x2e, 0xa5, 0x97, 0x5e, 0x4a, 0xa1, 0x94, 0x1e, 0x7a, 0x0b, 0xf4, 0x92, 0xde, 0xfa, 0x6f, 0xf4,
0xd8, 0x7f, 0xa1, 0xff, 0x40, 0x6f, 0xed, 0xa1, 0x50, 0x24, 0x8d, 0x2c, 0x3b, 0x56, 0x6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0x51, 0x5d, 0x5e, 0x21, 0xeb, 0xff, 0x44, 0x54, 0xfc,
0x7f, 0x9b, 0xc5, 0x25, 0x49, 0x7d, 0x6e, 0x59, 0xdb, 0xe3, 0xa6, 0xca, 0x64, 0x9b, 0xa4, 0x4e,
0xef, 0x11, 0xce, 0x0d, 0x8c, 0xaf, 0x31, 0xea, 0x94, 0x36, 0xee, 0x8a, 0x0b, 0x43, 0xe3, 0xf2,
0x72, 0xf0, 0x31, 0x90, 0xf4, 0x4c, 0xe5, 0xdc, 0x3d, 0x53, 0xb9, 0xe0, 0x9e, 0xf9, 0x88, 0xf0,
0xfc, 0xd0, 0x18, 0x26, 0xff, 0x8c, 0xa9, 0x7b, 0x78, 0x74, 0x67, 0xd3, 0x9e, 0x6d, 0x5e, 0x56,
0x2e, 0xb6, 0x41, 0x56, 0x4f, 0x10, 0xfe, 0xb1, 0xc9, 0x3b, 0xa3, 0xb4, 0xae, 0xce, 0x29, 0x8d,
0x9b, 0x81, 0xa2, 0x4d, 0xb4, 0x73, 0x45, 0x05, 0xd8, 0xdc, 0xa5, 0xcc, 0x36, 0xb8, 0x6f, 0x9b,
0x36, 0xb0, 0x50, 0xaf, 0x19, 0x6d, 0x51, 0xcf, 0x11, 0x67, 0x7e, 0x77, 0xae, 0x24, 0x4b, 0x1f,
0x10, 0x3a, 0xd6, 0xb4, 0xda, 0xda, 0x89, 0xb6, 0xbc, 0x1e, 0xe5, 0xac, 0x86, 0x24, 0x6a, 0x09,
0x89, 0x1b, 0x51, 0xd0, 0xee, 0x64, 0x98, 0xff, 0xf7, 0xcf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x48,
0x77, 0xb8, 0xb5, 0xd6, 0x0a, 0x00, 0x00,
}

View file

@ -0,0 +1,843 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/document.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
longrunning "google.golang.org/genproto/googleapis/longrunning"
_ "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The knowledge type of document content.
type Document_KnowledgeType int32
const (
// The type is unspecified or arbitrary.
Document_KNOWLEDGE_TYPE_UNSPECIFIED Document_KnowledgeType = 0
// The document content contains question and answer pairs as either HTML or
// CSV. Typical FAQ HTML formats are parsed accurately, but unusual formats
// may fail to be parsed.
//
// CSV must have questions in the first column and answers in the second,
// with no header. Because of this explicit format, they are always parsed
// accurately.
Document_FAQ Document_KnowledgeType = 1
// Documents for which unstructured text is extracted and used for
// question answering.
Document_EXTRACTIVE_QA Document_KnowledgeType = 2
)
var Document_KnowledgeType_name = map[int32]string{
0: "KNOWLEDGE_TYPE_UNSPECIFIED",
1: "FAQ",
2: "EXTRACTIVE_QA",
}
var Document_KnowledgeType_value = map[string]int32{
"KNOWLEDGE_TYPE_UNSPECIFIED": 0,
"FAQ": 1,
"EXTRACTIVE_QA": 2,
}
func (x Document_KnowledgeType) String() string {
return proto.EnumName(Document_KnowledgeType_name, int32(x))
}
func (Document_KnowledgeType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{0, 0}
}
// States of the operation.
type KnowledgeOperationMetadata_State int32
const (
// State unspecified.
KnowledgeOperationMetadata_STATE_UNSPECIFIED KnowledgeOperationMetadata_State = 0
// The operation has been created.
KnowledgeOperationMetadata_PENDING KnowledgeOperationMetadata_State = 1
// The operation is currently running.
KnowledgeOperationMetadata_RUNNING KnowledgeOperationMetadata_State = 2
// The operation is done, either cancelled or completed.
KnowledgeOperationMetadata_DONE KnowledgeOperationMetadata_State = 3
)
var KnowledgeOperationMetadata_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "PENDING",
2: "RUNNING",
3: "DONE",
}
var KnowledgeOperationMetadata_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"PENDING": 1,
"RUNNING": 2,
"DONE": 3,
}
func (x KnowledgeOperationMetadata_State) String() string {
return proto.EnumName(KnowledgeOperationMetadata_State_name, int32(x))
}
func (KnowledgeOperationMetadata_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{6, 0}
}
// A document resource.
type Document struct {
// The document resource name.
// The name must be empty when creating a document.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
// ID>/documents/<Document ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The display name of the document. The name must be 1024 bytes or
// less; otherwise, the creation request fails.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Required. The MIME type of this document.
MimeType string `protobuf:"bytes,3,opt,name=mime_type,json=mimeType,proto3" json:"mime_type,omitempty"`
// Required. The knowledge type of document content.
KnowledgeTypes []Document_KnowledgeType `protobuf:"varint,4,rep,packed,name=knowledge_types,json=knowledgeTypes,proto3,enum=google.cloud.dialogflow.v2beta1.Document_KnowledgeType" json:"knowledge_types,omitempty"`
// Required. The source of this document.
//
// Types that are valid to be assigned to Source:
// *Document_ContentUri
// *Document_Content
Source isDocument_Source `protobuf_oneof:"source"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Document) Reset() { *m = Document{} }
func (m *Document) String() string { return proto.CompactTextString(m) }
func (*Document) ProtoMessage() {}
func (*Document) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{0}
}
func (m *Document) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Document.Unmarshal(m, b)
}
func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Document.Marshal(b, m, deterministic)
}
func (m *Document) XXX_Merge(src proto.Message) {
xxx_messageInfo_Document.Merge(m, src)
}
func (m *Document) XXX_Size() int {
return xxx_messageInfo_Document.Size(m)
}
func (m *Document) XXX_DiscardUnknown() {
xxx_messageInfo_Document.DiscardUnknown(m)
}
var xxx_messageInfo_Document proto.InternalMessageInfo
func (m *Document) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Document) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *Document) GetMimeType() string {
if m != nil {
return m.MimeType
}
return ""
}
func (m *Document) GetKnowledgeTypes() []Document_KnowledgeType {
if m != nil {
return m.KnowledgeTypes
}
return nil
}
type isDocument_Source interface {
isDocument_Source()
}
type Document_ContentUri struct {
ContentUri string `protobuf:"bytes,5,opt,name=content_uri,json=contentUri,proto3,oneof"`
}
type Document_Content struct {
Content string `protobuf:"bytes,6,opt,name=content,proto3,oneof"`
}
func (*Document_ContentUri) isDocument_Source() {}
func (*Document_Content) isDocument_Source() {}
func (m *Document) GetSource() isDocument_Source {
if m != nil {
return m.Source
}
return nil
}
func (m *Document) GetContentUri() string {
if x, ok := m.GetSource().(*Document_ContentUri); ok {
return x.ContentUri
}
return ""
}
func (m *Document) GetContent() string {
if x, ok := m.GetSource().(*Document_Content); ok {
return x.Content
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Document) 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 _Document_OneofMarshaler, _Document_OneofUnmarshaler, _Document_OneofSizer, []interface{}{
(*Document_ContentUri)(nil),
(*Document_Content)(nil),
}
}
func _Document_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Document)
// source
switch x := m.Source.(type) {
case *Document_ContentUri:
b.EncodeVarint(5<<3 | proto.WireBytes)
b.EncodeStringBytes(x.ContentUri)
case *Document_Content:
b.EncodeVarint(6<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Content)
case nil:
default:
return fmt.Errorf("Document.Source has unexpected type %T", x)
}
return nil
}
func _Document_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Document)
switch tag {
case 5: // source.content_uri
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Source = &Document_ContentUri{x}
return true, err
case 6: // source.content
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.Source = &Document_Content{x}
return true, err
default:
return false, nil
}
}
func _Document_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Document)
// source
switch x := m.Source.(type) {
case *Document_ContentUri:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.ContentUri)))
n += len(x.ContentUri)
case *Document_Content:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Content)))
n += len(x.Content)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Request message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments].
type ListDocumentsRequest struct {
// Required. The knowledge base to list all documents for.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 10 and at most 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListDocumentsRequest) Reset() { *m = ListDocumentsRequest{} }
func (m *ListDocumentsRequest) String() string { return proto.CompactTextString(m) }
func (*ListDocumentsRequest) ProtoMessage() {}
func (*ListDocumentsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{1}
}
func (m *ListDocumentsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListDocumentsRequest.Unmarshal(m, b)
}
func (m *ListDocumentsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListDocumentsRequest.Marshal(b, m, deterministic)
}
func (m *ListDocumentsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListDocumentsRequest.Merge(m, src)
}
func (m *ListDocumentsRequest) XXX_Size() int {
return xxx_messageInfo_ListDocumentsRequest.Size(m)
}
func (m *ListDocumentsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListDocumentsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListDocumentsRequest proto.InternalMessageInfo
func (m *ListDocumentsRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListDocumentsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListDocumentsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response message for [Documents.ListDocuments][google.cloud.dialogflow.v2beta1.Documents.ListDocuments].
type ListDocumentsResponse struct {
// The list of documents.
Documents []*Document `protobuf:"bytes,1,rep,name=documents,proto3" json:"documents,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListDocumentsResponse) Reset() { *m = ListDocumentsResponse{} }
func (m *ListDocumentsResponse) String() string { return proto.CompactTextString(m) }
func (*ListDocumentsResponse) ProtoMessage() {}
func (*ListDocumentsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{2}
}
func (m *ListDocumentsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListDocumentsResponse.Unmarshal(m, b)
}
func (m *ListDocumentsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListDocumentsResponse.Marshal(b, m, deterministic)
}
func (m *ListDocumentsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListDocumentsResponse.Merge(m, src)
}
func (m *ListDocumentsResponse) XXX_Size() int {
return xxx_messageInfo_ListDocumentsResponse.Size(m)
}
func (m *ListDocumentsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListDocumentsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListDocumentsResponse proto.InternalMessageInfo
func (m *ListDocumentsResponse) GetDocuments() []*Document {
if m != nil {
return m.Documents
}
return nil
}
func (m *ListDocumentsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for [Documents.GetDocument][google.cloud.dialogflow.v2beta1.Documents.GetDocument].
type GetDocumentRequest struct {
// Required. The name of the document to retrieve.
// Format `projects/<Project ID>/knowledgeBases/<Knowledge Base
// ID>/documents/<Document ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetDocumentRequest) Reset() { *m = GetDocumentRequest{} }
func (m *GetDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*GetDocumentRequest) ProtoMessage() {}
func (*GetDocumentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{3}
}
func (m *GetDocumentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetDocumentRequest.Unmarshal(m, b)
}
func (m *GetDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetDocumentRequest.Marshal(b, m, deterministic)
}
func (m *GetDocumentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetDocumentRequest.Merge(m, src)
}
func (m *GetDocumentRequest) XXX_Size() int {
return xxx_messageInfo_GetDocumentRequest.Size(m)
}
func (m *GetDocumentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetDocumentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetDocumentRequest proto.InternalMessageInfo
func (m *GetDocumentRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for [Documents.CreateDocument][google.cloud.dialogflow.v2beta1.Documents.CreateDocument].
type CreateDocumentRequest struct {
// Required. The knoweldge base to create a document for.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The document to create.
Document *Document `protobuf:"bytes,2,opt,name=document,proto3" json:"document,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateDocumentRequest) Reset() { *m = CreateDocumentRequest{} }
func (m *CreateDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*CreateDocumentRequest) ProtoMessage() {}
func (*CreateDocumentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{4}
}
func (m *CreateDocumentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateDocumentRequest.Unmarshal(m, b)
}
func (m *CreateDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateDocumentRequest.Marshal(b, m, deterministic)
}
func (m *CreateDocumentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateDocumentRequest.Merge(m, src)
}
func (m *CreateDocumentRequest) XXX_Size() int {
return xxx_messageInfo_CreateDocumentRequest.Size(m)
}
func (m *CreateDocumentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateDocumentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateDocumentRequest proto.InternalMessageInfo
func (m *CreateDocumentRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateDocumentRequest) GetDocument() *Document {
if m != nil {
return m.Document
}
return nil
}
// Request message for [Documents.DeleteDocument][google.cloud.dialogflow.v2beta1.Documents.DeleteDocument].
type DeleteDocumentRequest struct {
// The name of the document to delete.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base
// ID>/documents/<Document ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteDocumentRequest) Reset() { *m = DeleteDocumentRequest{} }
func (m *DeleteDocumentRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteDocumentRequest) ProtoMessage() {}
func (*DeleteDocumentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{5}
}
func (m *DeleteDocumentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteDocumentRequest.Unmarshal(m, b)
}
func (m *DeleteDocumentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteDocumentRequest.Marshal(b, m, deterministic)
}
func (m *DeleteDocumentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteDocumentRequest.Merge(m, src)
}
func (m *DeleteDocumentRequest) XXX_Size() int {
return xxx_messageInfo_DeleteDocumentRequest.Size(m)
}
func (m *DeleteDocumentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteDocumentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteDocumentRequest proto.InternalMessageInfo
func (m *DeleteDocumentRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Metadata in google::longrunning::Operation for Knowledge operations.
type KnowledgeOperationMetadata struct {
// Required. The current state of this operation.
State KnowledgeOperationMetadata_State `protobuf:"varint,1,opt,name=state,proto3,enum=google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata_State" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KnowledgeOperationMetadata) Reset() { *m = KnowledgeOperationMetadata{} }
func (m *KnowledgeOperationMetadata) String() string { return proto.CompactTextString(m) }
func (*KnowledgeOperationMetadata) ProtoMessage() {}
func (*KnowledgeOperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_2d3494516d3ece6c, []int{6}
}
func (m *KnowledgeOperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KnowledgeOperationMetadata.Unmarshal(m, b)
}
func (m *KnowledgeOperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KnowledgeOperationMetadata.Marshal(b, m, deterministic)
}
func (m *KnowledgeOperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_KnowledgeOperationMetadata.Merge(m, src)
}
func (m *KnowledgeOperationMetadata) XXX_Size() int {
return xxx_messageInfo_KnowledgeOperationMetadata.Size(m)
}
func (m *KnowledgeOperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_KnowledgeOperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_KnowledgeOperationMetadata proto.InternalMessageInfo
func (m *KnowledgeOperationMetadata) GetState() KnowledgeOperationMetadata_State {
if m != nil {
return m.State
}
return KnowledgeOperationMetadata_STATE_UNSPECIFIED
}
func init() {
proto.RegisterEnum("google.cloud.dialogflow.v2beta1.Document_KnowledgeType", Document_KnowledgeType_name, Document_KnowledgeType_value)
proto.RegisterEnum("google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata_State", KnowledgeOperationMetadata_State_name, KnowledgeOperationMetadata_State_value)
proto.RegisterType((*Document)(nil), "google.cloud.dialogflow.v2beta1.Document")
proto.RegisterType((*ListDocumentsRequest)(nil), "google.cloud.dialogflow.v2beta1.ListDocumentsRequest")
proto.RegisterType((*ListDocumentsResponse)(nil), "google.cloud.dialogflow.v2beta1.ListDocumentsResponse")
proto.RegisterType((*GetDocumentRequest)(nil), "google.cloud.dialogflow.v2beta1.GetDocumentRequest")
proto.RegisterType((*CreateDocumentRequest)(nil), "google.cloud.dialogflow.v2beta1.CreateDocumentRequest")
proto.RegisterType((*DeleteDocumentRequest)(nil), "google.cloud.dialogflow.v2beta1.DeleteDocumentRequest")
proto.RegisterType((*KnowledgeOperationMetadata)(nil), "google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata")
}
// 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
// DocumentsClient is the client API for Documents service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type DocumentsClient interface {
// Returns the list of all documents of the knowledge base.
ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error)
// Retrieves the specified document.
GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error)
// Creates a new document.
//
// Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
CreateDocument(ctx context.Context, in *CreateDocumentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
// Deletes the specified document.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error)
}
type documentsClient struct {
cc *grpc.ClientConn
}
func NewDocumentsClient(cc *grpc.ClientConn) DocumentsClient {
return &documentsClient{cc}
}
func (c *documentsClient) ListDocuments(ctx context.Context, in *ListDocumentsRequest, opts ...grpc.CallOption) (*ListDocumentsResponse, error) {
out := new(ListDocumentsResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Documents/ListDocuments", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *documentsClient) GetDocument(ctx context.Context, in *GetDocumentRequest, opts ...grpc.CallOption) (*Document, error) {
out := new(Document)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Documents/GetDocument", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *documentsClient) CreateDocument(ctx context.Context, in *CreateDocumentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
out := new(longrunning.Operation)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Documents/CreateDocument", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *documentsClient) DeleteDocument(ctx context.Context, in *DeleteDocumentRequest, opts ...grpc.CallOption) (*longrunning.Operation, error) {
out := new(longrunning.Operation)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.Documents/DeleteDocument", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DocumentsServer is the server API for Documents service.
type DocumentsServer interface {
// Returns the list of all documents of the knowledge base.
ListDocuments(context.Context, *ListDocumentsRequest) (*ListDocumentsResponse, error)
// Retrieves the specified document.
GetDocument(context.Context, *GetDocumentRequest) (*Document, error)
// Creates a new document.
//
// Operation <response: [Document][google.cloud.dialogflow.v2beta1.Document],
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
CreateDocument(context.Context, *CreateDocumentRequest) (*longrunning.Operation, error)
// Deletes the specified document.
//
// Operation <response: [google.protobuf.Empty][google.protobuf.Empty],
// metadata: [KnowledgeOperationMetadata][google.cloud.dialogflow.v2beta1.KnowledgeOperationMetadata]>
DeleteDocument(context.Context, *DeleteDocumentRequest) (*longrunning.Operation, error)
}
func RegisterDocumentsServer(s *grpc.Server, srv DocumentsServer) {
s.RegisterService(&_Documents_serviceDesc, srv)
}
func _Documents_ListDocuments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListDocumentsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DocumentsServer).ListDocuments(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Documents/ListDocuments",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DocumentsServer).ListDocuments(ctx, req.(*ListDocumentsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Documents_GetDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDocumentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DocumentsServer).GetDocument(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Documents/GetDocument",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DocumentsServer).GetDocument(ctx, req.(*GetDocumentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Documents_CreateDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateDocumentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DocumentsServer).CreateDocument(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Documents/CreateDocument",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DocumentsServer).CreateDocument(ctx, req.(*CreateDocumentRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Documents_DeleteDocument_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDocumentRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DocumentsServer).DeleteDocument(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.Documents/DeleteDocument",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DocumentsServer).DeleteDocument(ctx, req.(*DeleteDocumentRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Documents_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2beta1.Documents",
HandlerType: (*DocumentsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListDocuments",
Handler: _Documents_ListDocuments_Handler,
},
{
MethodName: "GetDocument",
Handler: _Documents_GetDocument_Handler,
},
{
MethodName: "CreateDocument",
Handler: _Documents_CreateDocument_Handler,
},
{
MethodName: "DeleteDocument",
Handler: _Documents_DeleteDocument_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2beta1/document.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/document.proto", fileDescriptor_2d3494516d3ece6c)
}
var fileDescriptor_2d3494516d3ece6c = []byte{
// 885 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xcd, 0x6e, 0x1b, 0x55,
0x14, 0xee, 0x1d, 0xe7, 0xc7, 0x39, 0xc6, 0xae, 0x7b, 0x45, 0x90, 0xe5, 0x52, 0x9a, 0x4e, 0x25,
0x14, 0x8c, 0x34, 0x23, 0x5c, 0x41, 0x25, 0x50, 0x85, 0xec, 0xcc, 0xc4, 0x58, 0x29, 0x13, 0x77,
0xe2, 0xb4, 0x90, 0xcd, 0x70, 0x63, 0x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xc8, 0xd6, 0xdd, 0x78, 0xf9, 0x75, 0x37, 0x5e, 0x6d, 0xdd, 0xed,
0x5f, 0x11, 0xdc, 0x1e, 0xf0, 0xd1, 0xa2, 0xfe, 0xda, 0xe5, 0xac, 0xb5, 0x5e, 0xf4, 0x15, 0xd0,
0x43, 0x07, 0xdd, 0xb4, 0xc2, 0xe5, 0x3e, 0x61, 0xae, 0xc6, 0x43, 0x57, 0x77, 0x29, 0x8b, 0xbf,
0x11, 0xf4, 0x24, 0x44, 0x02, 0x4f, 0x9c, 0xfb, 0xe5, 0xf3, 0xd1, 0xc4, 0xf5, 0x2f, 0x42, 0x3f,
0x2b, 0x8a, 0xb1, 0xfd, 0x8b, 0x72, 0xb3, 0x93, 0x60, 0x6e, 0xc5, 0x2c, 0x8c, 0x09, 0x8b, 0x87,
0x49, 0xd1, 0xe1, 0x4a, 0x8c, 0x7f, 0xe7, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xc6, 0x50,
0x98, 0x58, 0x09, 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,575 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/knowledge_base.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
_ "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// Represents knowledge base resource.
type KnowledgeBase struct {
// The knowledge base resource name.
// The name must be empty when creating a knowledge base.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. The display name of the knowledge base. The name must be 1024
// bytes or less; otherwise, the creation request fails.
DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KnowledgeBase) Reset() { *m = KnowledgeBase{} }
func (m *KnowledgeBase) String() string { return proto.CompactTextString(m) }
func (*KnowledgeBase) ProtoMessage() {}
func (*KnowledgeBase) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{0}
}
func (m *KnowledgeBase) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KnowledgeBase.Unmarshal(m, b)
}
func (m *KnowledgeBase) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KnowledgeBase.Marshal(b, m, deterministic)
}
func (m *KnowledgeBase) XXX_Merge(src proto.Message) {
xxx_messageInfo_KnowledgeBase.Merge(m, src)
}
func (m *KnowledgeBase) XXX_Size() int {
return xxx_messageInfo_KnowledgeBase.Size(m)
}
func (m *KnowledgeBase) XXX_DiscardUnknown() {
xxx_messageInfo_KnowledgeBase.DiscardUnknown(m)
}
var xxx_messageInfo_KnowledgeBase proto.InternalMessageInfo
func (m *KnowledgeBase) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *KnowledgeBase) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
// Request message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases].
type ListKnowledgeBasesRequest struct {
// Required. The agent to list of knowledge bases for.
// Format: `projects/<Project ID>/agent`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 10 and at most 100.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListKnowledgeBasesRequest) Reset() { *m = ListKnowledgeBasesRequest{} }
func (m *ListKnowledgeBasesRequest) String() string { return proto.CompactTextString(m) }
func (*ListKnowledgeBasesRequest) ProtoMessage() {}
func (*ListKnowledgeBasesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{1}
}
func (m *ListKnowledgeBasesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListKnowledgeBasesRequest.Unmarshal(m, b)
}
func (m *ListKnowledgeBasesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListKnowledgeBasesRequest.Marshal(b, m, deterministic)
}
func (m *ListKnowledgeBasesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListKnowledgeBasesRequest.Merge(m, src)
}
func (m *ListKnowledgeBasesRequest) XXX_Size() int {
return xxx_messageInfo_ListKnowledgeBasesRequest.Size(m)
}
func (m *ListKnowledgeBasesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListKnowledgeBasesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListKnowledgeBasesRequest proto.InternalMessageInfo
func (m *ListKnowledgeBasesRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListKnowledgeBasesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListKnowledgeBasesRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// Response message for [KnowledgeBases.ListKnowledgeBases][google.cloud.dialogflow.v2beta1.KnowledgeBases.ListKnowledgeBases].
type ListKnowledgeBasesResponse struct {
// The list of knowledge bases.
KnowledgeBases []*KnowledgeBase `protobuf:"bytes,1,rep,name=knowledge_bases,json=knowledgeBases,proto3" json:"knowledge_bases,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListKnowledgeBasesResponse) Reset() { *m = ListKnowledgeBasesResponse{} }
func (m *ListKnowledgeBasesResponse) String() string { return proto.CompactTextString(m) }
func (*ListKnowledgeBasesResponse) ProtoMessage() {}
func (*ListKnowledgeBasesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{2}
}
func (m *ListKnowledgeBasesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListKnowledgeBasesResponse.Unmarshal(m, b)
}
func (m *ListKnowledgeBasesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListKnowledgeBasesResponse.Marshal(b, m, deterministic)
}
func (m *ListKnowledgeBasesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListKnowledgeBasesResponse.Merge(m, src)
}
func (m *ListKnowledgeBasesResponse) XXX_Size() int {
return xxx_messageInfo_ListKnowledgeBasesResponse.Size(m)
}
func (m *ListKnowledgeBasesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListKnowledgeBasesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListKnowledgeBasesResponse proto.InternalMessageInfo
func (m *ListKnowledgeBasesResponse) GetKnowledgeBases() []*KnowledgeBase {
if m != nil {
return m.KnowledgeBases
}
return nil
}
func (m *ListKnowledgeBasesResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// Request message for [KnowledgeBase.GetDocument][].
type GetKnowledgeBaseRequest struct {
// Required. The name of the knowledge base to retrieve.
// Format `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetKnowledgeBaseRequest) Reset() { *m = GetKnowledgeBaseRequest{} }
func (m *GetKnowledgeBaseRequest) String() string { return proto.CompactTextString(m) }
func (*GetKnowledgeBaseRequest) ProtoMessage() {}
func (*GetKnowledgeBaseRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{3}
}
func (m *GetKnowledgeBaseRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetKnowledgeBaseRequest.Unmarshal(m, b)
}
func (m *GetKnowledgeBaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetKnowledgeBaseRequest.Marshal(b, m, deterministic)
}
func (m *GetKnowledgeBaseRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetKnowledgeBaseRequest.Merge(m, src)
}
func (m *GetKnowledgeBaseRequest) XXX_Size() int {
return xxx_messageInfo_GetKnowledgeBaseRequest.Size(m)
}
func (m *GetKnowledgeBaseRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetKnowledgeBaseRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetKnowledgeBaseRequest proto.InternalMessageInfo
func (m *GetKnowledgeBaseRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Request message for [KnowledgeBases.CreateKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.CreateKnowledgeBase].
type CreateKnowledgeBaseRequest struct {
// Required. The agent to create a knowledge base for.
// Format: `projects/<Project ID>/agent`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The knowledge base to create.
KnowledgeBase *KnowledgeBase `protobuf:"bytes,2,opt,name=knowledge_base,json=knowledgeBase,proto3" json:"knowledge_base,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateKnowledgeBaseRequest) Reset() { *m = CreateKnowledgeBaseRequest{} }
func (m *CreateKnowledgeBaseRequest) String() string { return proto.CompactTextString(m) }
func (*CreateKnowledgeBaseRequest) ProtoMessage() {}
func (*CreateKnowledgeBaseRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{4}
}
func (m *CreateKnowledgeBaseRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateKnowledgeBaseRequest.Unmarshal(m, b)
}
func (m *CreateKnowledgeBaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateKnowledgeBaseRequest.Marshal(b, m, deterministic)
}
func (m *CreateKnowledgeBaseRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateKnowledgeBaseRequest.Merge(m, src)
}
func (m *CreateKnowledgeBaseRequest) XXX_Size() int {
return xxx_messageInfo_CreateKnowledgeBaseRequest.Size(m)
}
func (m *CreateKnowledgeBaseRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateKnowledgeBaseRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateKnowledgeBaseRequest proto.InternalMessageInfo
func (m *CreateKnowledgeBaseRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateKnowledgeBaseRequest) GetKnowledgeBase() *KnowledgeBase {
if m != nil {
return m.KnowledgeBase
}
return nil
}
// Request message for [KnowledgeBases.DeleteKnowledgeBase][google.cloud.dialogflow.v2beta1.KnowledgeBases.DeleteKnowledgeBase].
type DeleteKnowledgeBaseRequest struct {
// Required. The name of the knowledge base to delete.
// Format: `projects/<Project ID>/knowledgeBases/<Knowledge Base ID>`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Optional. Force deletes the knowledge base. When set to true, any documents
// in the knowledge base are also deleted.
Force bool `protobuf:"varint,2,opt,name=force,proto3" json:"force,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteKnowledgeBaseRequest) Reset() { *m = DeleteKnowledgeBaseRequest{} }
func (m *DeleteKnowledgeBaseRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteKnowledgeBaseRequest) ProtoMessage() {}
func (*DeleteKnowledgeBaseRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9cdbbb049e0ce16a, []int{5}
}
func (m *DeleteKnowledgeBaseRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteKnowledgeBaseRequest.Unmarshal(m, b)
}
func (m *DeleteKnowledgeBaseRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteKnowledgeBaseRequest.Marshal(b, m, deterministic)
}
func (m *DeleteKnowledgeBaseRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteKnowledgeBaseRequest.Merge(m, src)
}
func (m *DeleteKnowledgeBaseRequest) XXX_Size() int {
return xxx_messageInfo_DeleteKnowledgeBaseRequest.Size(m)
}
func (m *DeleteKnowledgeBaseRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteKnowledgeBaseRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteKnowledgeBaseRequest proto.InternalMessageInfo
func (m *DeleteKnowledgeBaseRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *DeleteKnowledgeBaseRequest) GetForce() bool {
if m != nil {
return m.Force
}
return false
}
func init() {
proto.RegisterType((*KnowledgeBase)(nil), "google.cloud.dialogflow.v2beta1.KnowledgeBase")
proto.RegisterType((*ListKnowledgeBasesRequest)(nil), "google.cloud.dialogflow.v2beta1.ListKnowledgeBasesRequest")
proto.RegisterType((*ListKnowledgeBasesResponse)(nil), "google.cloud.dialogflow.v2beta1.ListKnowledgeBasesResponse")
proto.RegisterType((*GetKnowledgeBaseRequest)(nil), "google.cloud.dialogflow.v2beta1.GetKnowledgeBaseRequest")
proto.RegisterType((*CreateKnowledgeBaseRequest)(nil), "google.cloud.dialogflow.v2beta1.CreateKnowledgeBaseRequest")
proto.RegisterType((*DeleteKnowledgeBaseRequest)(nil), "google.cloud.dialogflow.v2beta1.DeleteKnowledgeBaseRequest")
}
// 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
// KnowledgeBasesClient is the client API for KnowledgeBases service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type KnowledgeBasesClient interface {
// Returns the list of all knowledge bases of the specified agent.
ListKnowledgeBases(ctx context.Context, in *ListKnowledgeBasesRequest, opts ...grpc.CallOption) (*ListKnowledgeBasesResponse, error)
// Retrieves the specified knowledge base.
GetKnowledgeBase(ctx context.Context, in *GetKnowledgeBaseRequest, opts ...grpc.CallOption) (*KnowledgeBase, error)
// Creates a knowledge base.
CreateKnowledgeBase(ctx context.Context, in *CreateKnowledgeBaseRequest, opts ...grpc.CallOption) (*KnowledgeBase, error)
// Deletes the specified knowledge base.
DeleteKnowledgeBase(ctx context.Context, in *DeleteKnowledgeBaseRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type knowledgeBasesClient struct {
cc *grpc.ClientConn
}
func NewKnowledgeBasesClient(cc *grpc.ClientConn) KnowledgeBasesClient {
return &knowledgeBasesClient{cc}
}
func (c *knowledgeBasesClient) ListKnowledgeBases(ctx context.Context, in *ListKnowledgeBasesRequest, opts ...grpc.CallOption) (*ListKnowledgeBasesResponse, error) {
out := new(ListKnowledgeBasesResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.KnowledgeBases/ListKnowledgeBases", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *knowledgeBasesClient) GetKnowledgeBase(ctx context.Context, in *GetKnowledgeBaseRequest, opts ...grpc.CallOption) (*KnowledgeBase, error) {
out := new(KnowledgeBase)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.KnowledgeBases/GetKnowledgeBase", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *knowledgeBasesClient) CreateKnowledgeBase(ctx context.Context, in *CreateKnowledgeBaseRequest, opts ...grpc.CallOption) (*KnowledgeBase, error) {
out := new(KnowledgeBase)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.KnowledgeBases/CreateKnowledgeBase", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *knowledgeBasesClient) DeleteKnowledgeBase(ctx context.Context, in *DeleteKnowledgeBaseRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.KnowledgeBases/DeleteKnowledgeBase", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// KnowledgeBasesServer is the server API for KnowledgeBases service.
type KnowledgeBasesServer interface {
// Returns the list of all knowledge bases of the specified agent.
ListKnowledgeBases(context.Context, *ListKnowledgeBasesRequest) (*ListKnowledgeBasesResponse, error)
// Retrieves the specified knowledge base.
GetKnowledgeBase(context.Context, *GetKnowledgeBaseRequest) (*KnowledgeBase, error)
// Creates a knowledge base.
CreateKnowledgeBase(context.Context, *CreateKnowledgeBaseRequest) (*KnowledgeBase, error)
// Deletes the specified knowledge base.
DeleteKnowledgeBase(context.Context, *DeleteKnowledgeBaseRequest) (*empty.Empty, error)
}
func RegisterKnowledgeBasesServer(s *grpc.Server, srv KnowledgeBasesServer) {
s.RegisterService(&_KnowledgeBases_serviceDesc, srv)
}
func _KnowledgeBases_ListKnowledgeBases_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListKnowledgeBasesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KnowledgeBasesServer).ListKnowledgeBases(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.KnowledgeBases/ListKnowledgeBases",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KnowledgeBasesServer).ListKnowledgeBases(ctx, req.(*ListKnowledgeBasesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KnowledgeBases_GetKnowledgeBase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetKnowledgeBaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KnowledgeBasesServer).GetKnowledgeBase(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.KnowledgeBases/GetKnowledgeBase",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KnowledgeBasesServer).GetKnowledgeBase(ctx, req.(*GetKnowledgeBaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KnowledgeBases_CreateKnowledgeBase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateKnowledgeBaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KnowledgeBasesServer).CreateKnowledgeBase(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.KnowledgeBases/CreateKnowledgeBase",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KnowledgeBasesServer).CreateKnowledgeBase(ctx, req.(*CreateKnowledgeBaseRequest))
}
return interceptor(ctx, in, info, handler)
}
func _KnowledgeBases_DeleteKnowledgeBase_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteKnowledgeBaseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(KnowledgeBasesServer).DeleteKnowledgeBase(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.KnowledgeBases/DeleteKnowledgeBase",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(KnowledgeBasesServer).DeleteKnowledgeBase(ctx, req.(*DeleteKnowledgeBaseRequest))
}
return interceptor(ctx, in, info, handler)
}
var _KnowledgeBases_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2beta1.KnowledgeBases",
HandlerType: (*KnowledgeBasesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListKnowledgeBases",
Handler: _KnowledgeBases_ListKnowledgeBases_Handler,
},
{
MethodName: "GetKnowledgeBase",
Handler: _KnowledgeBases_GetKnowledgeBase_Handler,
},
{
MethodName: "CreateKnowledgeBase",
Handler: _KnowledgeBases_CreateKnowledgeBase_Handler,
},
{
MethodName: "DeleteKnowledgeBase",
Handler: _KnowledgeBases_DeleteKnowledgeBase_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2beta1/knowledge_base.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/knowledge_base.proto", fileDescriptor_9cdbbb049e0ce16a)
}
var fileDescriptor_9cdbbb049e0ce16a = []byte{
// 639 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xcf, 0x4f, 0xd4, 0x40,
0x14, 0xce, 0x2c, 0x82, 0x30, 0x08, 0x98, 0xc1, 0x20, 0x16, 0x0d, 0x58, 0x13, 0x43, 0xd6, 0xd8,
0x09, 0xe0, 0xc1, 0x40, 0xbc, 0x00, 0x42, 0x8c, 0xc6,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81, 0x2c, 0xfc, 0x33, 0x5d, 0x39, 0x0e, 0xfd, 0x46, 0xe8, 0x53, 0xa5, 0xb2, 0xbe, 0xf1, 0xb9,
0x32, 0xbb, 0x69, 0x6a, 0xae, 0x69, 0x2a, 0xeb, 0xc7, 0x54, 0x9e, 0x1a, 0x50, 0x63, 0x48, 0xd7,
0x5f, 0xfa, 0x13, 0x00, 0x00, 0xff, 0xff, 0xad, 0x8b, 0xb2, 0x9f, 0xab, 0x07, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,747 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/session_entity_type.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The types of modifications for a session entity type.
type SessionEntityType_EntityOverrideMode int32
const (
// Not specified. This value should be never used.
SessionEntityType_ENTITY_OVERRIDE_MODE_UNSPECIFIED SessionEntityType_EntityOverrideMode = 0
// The collection of session entities overrides the collection of entities
// in the corresponding developer entity type.
SessionEntityType_ENTITY_OVERRIDE_MODE_OVERRIDE SessionEntityType_EntityOverrideMode = 1
// The collection of session entities extends the collection of entities in
// the corresponding developer entity type.
// Calls to `ListSessionEntityTypes`, `GetSessionEntityType`,
// `CreateSessionEntityType` and `UpdateSessionEntityType` return the full
// collection of entities from the developer entity type in the agent's
// default language and the session entity type.
SessionEntityType_ENTITY_OVERRIDE_MODE_SUPPLEMENT SessionEntityType_EntityOverrideMode = 2
)
var SessionEntityType_EntityOverrideMode_name = map[int32]string{
0: "ENTITY_OVERRIDE_MODE_UNSPECIFIED",
1: "ENTITY_OVERRIDE_MODE_OVERRIDE",
2: "ENTITY_OVERRIDE_MODE_SUPPLEMENT",
}
var SessionEntityType_EntityOverrideMode_value = map[string]int32{
"ENTITY_OVERRIDE_MODE_UNSPECIFIED": 0,
"ENTITY_OVERRIDE_MODE_OVERRIDE": 1,
"ENTITY_OVERRIDE_MODE_SUPPLEMENT": 2,
}
func (x SessionEntityType_EntityOverrideMode) String() string {
return proto.EnumName(SessionEntityType_EntityOverrideMode_name, int32(x))
}
func (SessionEntityType_EntityOverrideMode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{0, 0}
}
// Represents a session entity type.
//
// Extends or replaces a developer entity type at the user session level (we
// refer to the entity types defined at the agent level as "developer entity
// types").
//
// Note: session entity types apply to all queries, regardless of the language.
type SessionEntityType struct {
// Required. The unique identifier of this session entity type. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>`, or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User
// ID>/sessions/<Session ID>/entityTypes/<Entity Type Display Name>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required. Indicates whether the additional data should override or
// supplement the developer entity type definition.
EntityOverrideMode SessionEntityType_EntityOverrideMode `protobuf:"varint,2,opt,name=entity_override_mode,json=entityOverrideMode,proto3,enum=google.cloud.dialogflow.v2beta1.SessionEntityType_EntityOverrideMode" json:"entity_override_mode,omitempty"`
// Required. The collection of entities associated with this session entity
// type.
Entities []*EntityType_Entity `protobuf:"bytes,3,rep,name=entities,proto3" json:"entities,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SessionEntityType) Reset() { *m = SessionEntityType{} }
func (m *SessionEntityType) String() string { return proto.CompactTextString(m) }
func (*SessionEntityType) ProtoMessage() {}
func (*SessionEntityType) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{0}
}
func (m *SessionEntityType) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SessionEntityType.Unmarshal(m, b)
}
func (m *SessionEntityType) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SessionEntityType.Marshal(b, m, deterministic)
}
func (m *SessionEntityType) XXX_Merge(src proto.Message) {
xxx_messageInfo_SessionEntityType.Merge(m, src)
}
func (m *SessionEntityType) XXX_Size() int {
return xxx_messageInfo_SessionEntityType.Size(m)
}
func (m *SessionEntityType) XXX_DiscardUnknown() {
xxx_messageInfo_SessionEntityType.DiscardUnknown(m)
}
var xxx_messageInfo_SessionEntityType proto.InternalMessageInfo
func (m *SessionEntityType) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *SessionEntityType) GetEntityOverrideMode() SessionEntityType_EntityOverrideMode {
if m != nil {
return m.EntityOverrideMode
}
return SessionEntityType_ENTITY_OVERRIDE_MODE_UNSPECIFIED
}
func (m *SessionEntityType) GetEntities() []*EntityType_Entity {
if m != nil {
return m.Entities
}
return nil
}
// The request message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
type ListSessionEntityTypesRequest struct {
// Required. The session to list all session entity types from.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
// sessions/<Session ID>`.
// If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Optional. The maximum number of items to return in a single page. By
// default 100 and at most 1000.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// Optional. The next_page_token value returned from a previous list request.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSessionEntityTypesRequest) Reset() { *m = ListSessionEntityTypesRequest{} }
func (m *ListSessionEntityTypesRequest) String() string { return proto.CompactTextString(m) }
func (*ListSessionEntityTypesRequest) ProtoMessage() {}
func (*ListSessionEntityTypesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{1}
}
func (m *ListSessionEntityTypesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListSessionEntityTypesRequest.Unmarshal(m, b)
}
func (m *ListSessionEntityTypesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListSessionEntityTypesRequest.Marshal(b, m, deterministic)
}
func (m *ListSessionEntityTypesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSessionEntityTypesRequest.Merge(m, src)
}
func (m *ListSessionEntityTypesRequest) XXX_Size() int {
return xxx_messageInfo_ListSessionEntityTypesRequest.Size(m)
}
func (m *ListSessionEntityTypesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListSessionEntityTypesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListSessionEntityTypesRequest proto.InternalMessageInfo
func (m *ListSessionEntityTypesRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListSessionEntityTypesRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListSessionEntityTypesRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The response message for [SessionEntityTypes.ListSessionEntityTypes][google.cloud.dialogflow.v2beta1.SessionEntityTypes.ListSessionEntityTypes].
type ListSessionEntityTypesResponse struct {
// The list of session entity types. There will be a maximum number of items
// returned based on the page_size field in the request.
SessionEntityTypes []*SessionEntityType `protobuf:"bytes,1,rep,name=session_entity_types,json=sessionEntityTypes,proto3" json:"session_entity_types,omitempty"`
// Token to retrieve the next page of results, or empty if there are no
// more results in the list.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListSessionEntityTypesResponse) Reset() { *m = ListSessionEntityTypesResponse{} }
func (m *ListSessionEntityTypesResponse) String() string { return proto.CompactTextString(m) }
func (*ListSessionEntityTypesResponse) ProtoMessage() {}
func (*ListSessionEntityTypesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{2}
}
func (m *ListSessionEntityTypesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListSessionEntityTypesResponse.Unmarshal(m, b)
}
func (m *ListSessionEntityTypesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListSessionEntityTypesResponse.Marshal(b, m, deterministic)
}
func (m *ListSessionEntityTypesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListSessionEntityTypesResponse.Merge(m, src)
}
func (m *ListSessionEntityTypesResponse) XXX_Size() int {
return xxx_messageInfo_ListSessionEntityTypesResponse.Size(m)
}
func (m *ListSessionEntityTypesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListSessionEntityTypesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListSessionEntityTypesResponse proto.InternalMessageInfo
func (m *ListSessionEntityTypesResponse) GetSessionEntityTypes() []*SessionEntityType {
if m != nil {
return m.SessionEntityTypes
}
return nil
}
func (m *ListSessionEntityTypesResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for [SessionEntityTypes.GetSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.GetSessionEntityType].
type GetSessionEntityTypeRequest struct {
// Required. The name of the session entity type. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>` or `projects/<Project ID>/agent/environments/<Environment
// ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
// Name>`. If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSessionEntityTypeRequest) Reset() { *m = GetSessionEntityTypeRequest{} }
func (m *GetSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*GetSessionEntityTypeRequest) ProtoMessage() {}
func (*GetSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{3}
}
func (m *GetSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *GetSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *GetSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSessionEntityTypeRequest.Merge(m, src)
}
func (m *GetSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_GetSessionEntityTypeRequest.Size(m)
}
func (m *GetSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSessionEntityTypeRequest proto.InternalMessageInfo
func (m *GetSessionEntityTypeRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The request message for [SessionEntityTypes.CreateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.CreateSessionEntityType].
type CreateSessionEntityTypeRequest struct {
// Required. The session to create a session entity type for.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>` or
// `projects/<Project ID>/agent/environments/<Environment ID>/users/<User ID>/
// sessions/<Session ID>`. If `Environment ID` is not specified, we assume
// default 'draft' environment. If `User ID` is not specified, we assume
// default '-' user.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// Required. The session entity type to create.
SessionEntityType *SessionEntityType `protobuf:"bytes,2,opt,name=session_entity_type,json=sessionEntityType,proto3" json:"session_entity_type,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CreateSessionEntityTypeRequest) Reset() { *m = CreateSessionEntityTypeRequest{} }
func (m *CreateSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*CreateSessionEntityTypeRequest) ProtoMessage() {}
func (*CreateSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{4}
}
func (m *CreateSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *CreateSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *CreateSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_CreateSessionEntityTypeRequest.Merge(m, src)
}
func (m *CreateSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_CreateSessionEntityTypeRequest.Size(m)
}
func (m *CreateSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_CreateSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_CreateSessionEntityTypeRequest proto.InternalMessageInfo
func (m *CreateSessionEntityTypeRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateSessionEntityTypeRequest) GetSessionEntityType() *SessionEntityType {
if m != nil {
return m.SessionEntityType
}
return nil
}
// The request message for [SessionEntityTypes.UpdateSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.UpdateSessionEntityType].
type UpdateSessionEntityTypeRequest struct {
// Required. The entity type to update. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>` or `projects/<Project ID>/agent/environments/<Environment
// ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
// Name>`. If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
SessionEntityType *SessionEntityType `protobuf:"bytes,1,opt,name=session_entity_type,json=sessionEntityType,proto3" json:"session_entity_type,omitempty"`
// Optional. The mask to control which fields get updated.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateSessionEntityTypeRequest) Reset() { *m = UpdateSessionEntityTypeRequest{} }
func (m *UpdateSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateSessionEntityTypeRequest) ProtoMessage() {}
func (*UpdateSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{5}
}
func (m *UpdateSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateSessionEntityTypeRequest.Merge(m, src)
}
func (m *UpdateSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_UpdateSessionEntityTypeRequest.Size(m)
}
func (m *UpdateSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateSessionEntityTypeRequest proto.InternalMessageInfo
func (m *UpdateSessionEntityTypeRequest) GetSessionEntityType() *SessionEntityType {
if m != nil {
return m.SessionEntityType
}
return nil
}
func (m *UpdateSessionEntityTypeRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// The request message for [SessionEntityTypes.DeleteSessionEntityType][google.cloud.dialogflow.v2beta1.SessionEntityTypes.DeleteSessionEntityType].
type DeleteSessionEntityTypeRequest struct {
// Required. The name of the entity type to delete. Format:
// `projects/<Project ID>/agent/sessions/<Session ID>/entityTypes/<Entity Type
// Display Name>` or `projects/<Project ID>/agent/environments/<Environment
// ID>/users/<User ID>/sessions/<Session ID>/entityTypes/<Entity Type Display
// Name>`. If `Environment ID` is not specified, we assume default 'draft'
// environment. If `User ID` is not specified, we assume default '-' user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteSessionEntityTypeRequest) Reset() { *m = DeleteSessionEntityTypeRequest{} }
func (m *DeleteSessionEntityTypeRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSessionEntityTypeRequest) ProtoMessage() {}
func (*DeleteSessionEntityTypeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ea3dc39aca82329f, []int{6}
}
func (m *DeleteSessionEntityTypeRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Unmarshal(m, b)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Marshal(b, m, deterministic)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteSessionEntityTypeRequest.Merge(m, src)
}
func (m *DeleteSessionEntityTypeRequest) XXX_Size() int {
return xxx_messageInfo_DeleteSessionEntityTypeRequest.Size(m)
}
func (m *DeleteSessionEntityTypeRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteSessionEntityTypeRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteSessionEntityTypeRequest proto.InternalMessageInfo
func (m *DeleteSessionEntityTypeRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.dialogflow.v2beta1.SessionEntityType_EntityOverrideMode", SessionEntityType_EntityOverrideMode_name, SessionEntityType_EntityOverrideMode_value)
proto.RegisterType((*SessionEntityType)(nil), "google.cloud.dialogflow.v2beta1.SessionEntityType")
proto.RegisterType((*ListSessionEntityTypesRequest)(nil), "google.cloud.dialogflow.v2beta1.ListSessionEntityTypesRequest")
proto.RegisterType((*ListSessionEntityTypesResponse)(nil), "google.cloud.dialogflow.v2beta1.ListSessionEntityTypesResponse")
proto.RegisterType((*GetSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2beta1.GetSessionEntityTypeRequest")
proto.RegisterType((*CreateSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2beta1.CreateSessionEntityTypeRequest")
proto.RegisterType((*UpdateSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2beta1.UpdateSessionEntityTypeRequest")
proto.RegisterType((*DeleteSessionEntityTypeRequest)(nil), "google.cloud.dialogflow.v2beta1.DeleteSessionEntityTypeRequest")
}
// 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
// SessionEntityTypesClient is the client API for SessionEntityTypes service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type SessionEntityTypesClient interface {
// Returns the list of all session entity types in the specified session.
ListSessionEntityTypes(ctx context.Context, in *ListSessionEntityTypesRequest, opts ...grpc.CallOption) (*ListSessionEntityTypesResponse, error)
// Retrieves the specified session entity type.
GetSessionEntityType(ctx context.Context, in *GetSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Creates a session entity type.
CreateSessionEntityType(ctx context.Context, in *CreateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Updates the specified session entity type.
UpdateSessionEntityType(ctx context.Context, in *UpdateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error)
// Deletes the specified session entity type.
DeleteSessionEntityType(ctx context.Context, in *DeleteSessionEntityTypeRequest, opts ...grpc.CallOption) (*empty.Empty, error)
}
type sessionEntityTypesClient struct {
cc *grpc.ClientConn
}
func NewSessionEntityTypesClient(cc *grpc.ClientConn) SessionEntityTypesClient {
return &sessionEntityTypesClient{cc}
}
func (c *sessionEntityTypesClient) ListSessionEntityTypes(ctx context.Context, in *ListSessionEntityTypesRequest, opts ...grpc.CallOption) (*ListSessionEntityTypesResponse, error) {
out := new(ListSessionEntityTypesResponse)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/ListSessionEntityTypes", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) GetSessionEntityType(ctx context.Context, in *GetSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/GetSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) CreateSessionEntityType(ctx context.Context, in *CreateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/CreateSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) UpdateSessionEntityType(ctx context.Context, in *UpdateSessionEntityTypeRequest, opts ...grpc.CallOption) (*SessionEntityType, error) {
out := new(SessionEntityType)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/UpdateSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *sessionEntityTypesClient) DeleteSessionEntityType(ctx context.Context, in *DeleteSessionEntityTypeRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/DeleteSessionEntityType", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SessionEntityTypesServer is the server API for SessionEntityTypes service.
type SessionEntityTypesServer interface {
// Returns the list of all session entity types in the specified session.
ListSessionEntityTypes(context.Context, *ListSessionEntityTypesRequest) (*ListSessionEntityTypesResponse, error)
// Retrieves the specified session entity type.
GetSessionEntityType(context.Context, *GetSessionEntityTypeRequest) (*SessionEntityType, error)
// Creates a session entity type.
CreateSessionEntityType(context.Context, *CreateSessionEntityTypeRequest) (*SessionEntityType, error)
// Updates the specified session entity type.
UpdateSessionEntityType(context.Context, *UpdateSessionEntityTypeRequest) (*SessionEntityType, error)
// Deletes the specified session entity type.
DeleteSessionEntityType(context.Context, *DeleteSessionEntityTypeRequest) (*empty.Empty, error)
}
func RegisterSessionEntityTypesServer(s *grpc.Server, srv SessionEntityTypesServer) {
s.RegisterService(&_SessionEntityTypes_serviceDesc, srv)
}
func _SessionEntityTypes_ListSessionEntityTypes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListSessionEntityTypesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).ListSessionEntityTypes(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/ListSessionEntityTypes",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).ListSessionEntityTypes(ctx, req.(*ListSessionEntityTypesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_GetSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).GetSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/GetSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).GetSessionEntityType(ctx, req.(*GetSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_CreateSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).CreateSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/CreateSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).CreateSessionEntityType(ctx, req.(*CreateSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_UpdateSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).UpdateSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/UpdateSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).UpdateSessionEntityType(ctx, req.(*UpdateSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SessionEntityTypes_DeleteSessionEntityType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSessionEntityTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SessionEntityTypesServer).DeleteSessionEntityType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.dialogflow.v2beta1.SessionEntityTypes/DeleteSessionEntityType",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SessionEntityTypesServer).DeleteSessionEntityType(ctx, req.(*DeleteSessionEntityTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _SessionEntityTypes_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.dialogflow.v2beta1.SessionEntityTypes",
HandlerType: (*SessionEntityTypesServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListSessionEntityTypes",
Handler: _SessionEntityTypes_ListSessionEntityTypes_Handler,
},
{
MethodName: "GetSessionEntityType",
Handler: _SessionEntityTypes_GetSessionEntityType_Handler,
},
{
MethodName: "CreateSessionEntityType",
Handler: _SessionEntityTypes_CreateSessionEntityType_Handler,
},
{
MethodName: "UpdateSessionEntityType",
Handler: _SessionEntityTypes_UpdateSessionEntityType_Handler,
},
{
MethodName: "DeleteSessionEntityType",
Handler: _SessionEntityTypes_DeleteSessionEntityType_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/dialogflow/v2beta1/session_entity_type.proto",
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/session_entity_type.proto", fileDescriptor_ea3dc39aca82329f)
}
var fileDescriptor_ea3dc39aca82329f = []byte{
// 870 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcf, 0x6f, 0xe3, 0x44,
0x14, 0x66, 0x5c, 0x58, 0xed, 0xce, 0xf2, 0xa3, 0x3b, 0x54, 0x69, 0x94, 0xd2, 0x34, 0x78, 0x11,
0xaa, 0x72, 0xb0, 0xd5, 0xc0, 0x65, 0x59, 0x7e, 0x48, 0xdb, 0xb8, 0xab, 0x48, 0x9b, 0x34, 0x72,
0xd2, 0x4a, 0xf4, 0x62, 0x39, 0xf5, 0xab, 0x65, 0x9a, 0xcc, 0x18, 0xcf, 0xa4, 0x25, 0xad, 0x7a,
0xe9, 0x95, 0x03, 0x07, 0x24, 0x4e, 0x5c, 0xe0, 0xc8, 0x81, 0x03, 0xe2, 0xc2, 0x0d, 0xce, 0x9c,
0x10, 0x7f, 0x01, 0x12, 0x07, 0xfe, 0x01, 0x24, 0xb8, 0x21, 0x8f, 0x9d, 0xa6, 0xd4, 0xbf, 0xda,
0x6c, 0x4f, 0xb1, 0x9f, 0xe7, 0x7b, 0xef, 0x7d, 0x9f, 0xdf, 0xfb, 0x62, 0xfc, 0xc8, 0x65, 0xcc,
0x1d, 0x82, 0xbe, 0x3f, 0x64, 0x63, 0x47, 0x77, 0x3c, 0x7b, 0xc8, 0xdc, 0x83, 0x21, 0x3b, 0xd6,
0x8f, 0x1a, 0x03, 0x10, 0xf6, 0x86, 0xce, 0x81, 0x73, 0x8f, 0x51, 0x0b, 0xa8, 0xf0, 0xc4, 0xc4,
0x12, 0x13, 0x1f, 0x34, 0x3f, 0x60, 0x82, 0x91, 0xb5, 0x08, 0xaa, 0x49, 0xa8, 0x36, 0x83, 0x6a,
0x31, 0xb4, 0xf2, 0x46, 0x9c, 0xdb, 0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2a, 0x78, 0x39, 0xc3,
0xbd, 0xae, 0xa1, 0x69, 0xbe, 0xef, 0xcd, 0xa5, 0xe9, 0x5f, 0x91, 0xa6, 0x7f, 0xa0, 0x46, 0x7b,
0xa6, 0x40, 0xda, 0xe7, 0xd9, 0x0d, 0x27, 0x32, 0x5d, 0xe7, 0xd3, 0x86, 0x33, 0x4f, 0x95, 0x9b,
0x8e, 0x6e, 0xba, 0xf6, 0x9f, 0x2b, 0x78, 0x39, 0xc3, 0x76, 0xaf, 0xa1, 0x7d, 0xbe, 0x61, 0x57,
0x4a, 0x09, 0xeb, 0x37, 0xc2, 0xcf, 0xc8, 0xd9, 0x76, 0xd7, 0x9f, 0x67, 0xbb, 0xeb, 0xb7, 0xbe,
0xdd, 0x4f, 0x7e, 0x44, 0xf8, 0xe1, 0x3e, 0x1b, 0x15, 0xf1, 0x7e, 0x52, 0x4a, 0x50, 0xee, 0x86,
0x0c, 0xbb, 0x68, 0xaf, 0x15, 0x43, 0x5d, 0x36, 0xb4, 0xa9, 0xab, 0xb1, 0xc0, 0xd5, 0x5d, 0xa0,
0x92, 0xbf, 0x1e, 0x3d, 0xb2, 0x7d, 0x8f, 0x67, 0x7e, 0x8a, 0x3f, 0x9e, 0x85, 0xfe, 0x41, 0xe8,
0x5b, 0x45, 0x69, 0x6e, 0x7d, 0xa7, 0xac, 0x3d, 0x8d, 0x72, 0x6e, 0xca, 0x76, 0x9a, 0xb3, 0x76,
0x76, 0x23, 0xd0, 0xe0, 0x8e, 0xcc, 0xff, 0xce, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdc, 0xc9,
0xd4, 0x00, 0x63, 0x0c, 0x00, 0x00,
}

View file

@ -0,0 +1,356 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/dialogflow/v2beta1/webhook.proto
package dialogflow
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_struct "github.com/golang/protobuf/ptypes/struct"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// The request message for a webhook call.
type WebhookRequest struct {
// The unique identifier of detectIntent request session.
// Can be used to identify end-user inside webhook implementation.
// Format: `projects/<Project ID>/agent/sessions/<Session ID>`.
Session string `protobuf:"bytes,4,opt,name=session,proto3" json:"session,omitempty"`
// The unique identifier of the response. Contains the same value as
// `[Streaming]DetectIntentResponse.response_id`.
ResponseId string `protobuf:"bytes,1,opt,name=response_id,json=responseId,proto3" json:"response_id,omitempty"`
// The result of the conversational query or event processing. Contains the
// same value as `[Streaming]DetectIntentResponse.query_result`.
QueryResult *QueryResult `protobuf:"bytes,2,opt,name=query_result,json=queryResult,proto3" json:"query_result,omitempty"`
// Alternative query results from KnowledgeService.
AlternativeQueryResults []*QueryResult `protobuf:"bytes,5,rep,name=alternative_query_results,json=alternativeQueryResults,proto3" json:"alternative_query_results,omitempty"`
// Optional. The contents of the original request that was passed to
// `[Streaming]DetectIntent` call.
OriginalDetectIntentRequest *OriginalDetectIntentRequest `protobuf:"bytes,3,opt,name=original_detect_intent_request,json=originalDetectIntentRequest,proto3" json:"original_detect_intent_request,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebhookRequest) Reset() { *m = WebhookRequest{} }
func (m *WebhookRequest) String() string { return proto.CompactTextString(m) }
func (*WebhookRequest) ProtoMessage() {}
func (*WebhookRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e44190e355d0ffbc, []int{0}
}
func (m *WebhookRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebhookRequest.Unmarshal(m, b)
}
func (m *WebhookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebhookRequest.Marshal(b, m, deterministic)
}
func (m *WebhookRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebhookRequest.Merge(m, src)
}
func (m *WebhookRequest) XXX_Size() int {
return xxx_messageInfo_WebhookRequest.Size(m)
}
func (m *WebhookRequest) XXX_DiscardUnknown() {
xxx_messageInfo_WebhookRequest.DiscardUnknown(m)
}
var xxx_messageInfo_WebhookRequest proto.InternalMessageInfo
func (m *WebhookRequest) GetSession() string {
if m != nil {
return m.Session
}
return ""
}
func (m *WebhookRequest) GetResponseId() string {
if m != nil {
return m.ResponseId
}
return ""
}
func (m *WebhookRequest) GetQueryResult() *QueryResult {
if m != nil {
return m.QueryResult
}
return nil
}
func (m *WebhookRequest) GetAlternativeQueryResults() []*QueryResult {
if m != nil {
return m.AlternativeQueryResults
}
return nil
}
func (m *WebhookRequest) GetOriginalDetectIntentRequest() *OriginalDetectIntentRequest {
if m != nil {
return m.OriginalDetectIntentRequest
}
return nil
}
// The response message for a webhook call.
type WebhookResponse struct {
// Optional. The text to be shown on the screen. This value is passed directly
// to `QueryResult.fulfillment_text`.
FulfillmentText string `protobuf:"bytes,1,opt,name=fulfillment_text,json=fulfillmentText,proto3" json:"fulfillment_text,omitempty"`
// Optional. The collection of rich messages to present to the user. This
// value is passed directly to `QueryResult.fulfillment_messages`.
FulfillmentMessages []*Intent_Message `protobuf:"bytes,2,rep,name=fulfillment_messages,json=fulfillmentMessages,proto3" json:"fulfillment_messages,omitempty"`
// Optional. This value is passed directly to `QueryResult.webhook_source`.
Source string `protobuf:"bytes,3,opt,name=source,proto3" json:"source,omitempty"`
// Optional. This value is passed directly to `QueryResult.webhook_payload`.
// See the related `fulfillment_messages[i].payload field`, which may be used
// as an alternative to this field.
//
// This field can be used for Actions on Google responses.
// It should have a structure similar to the JSON message shown here. For more
// information, see
// [Actions on Google Webhook
// Format](https://developers.google.com/actions/dialogflow/webhook)
// <pre>{
// "google": {
// "expectUserResponse": true,
// "richResponse": {
// "items": [
// {
// "simpleResponse": {
// "textToSpeech": "this is a simple response"
// }
// }
// ]
// }
// }
// }</pre>
Payload *_struct.Struct `protobuf:"bytes,4,opt,name=payload,proto3" json:"payload,omitempty"`
// Optional. The collection of output contexts. This value is passed directly
// to `QueryResult.output_contexts`.
OutputContexts []*Context `protobuf:"bytes,5,rep,name=output_contexts,json=outputContexts,proto3" json:"output_contexts,omitempty"`
// Optional. Makes the platform immediately invoke another `DetectIntent` call
// internally with the specified event as input.
FollowupEventInput *EventInput `protobuf:"bytes,6,opt,name=followup_event_input,json=followupEventInput,proto3" json:"followup_event_input,omitempty"`
// Optional. Indicates that this intent ends an interaction. Some integrations
// (e.g., Actions on Google or Dialogflow phone gateway) use this information
// to close interaction with an end user. Default is false.
EndInteraction bool `protobuf:"varint,8,opt,name=end_interaction,json=endInteraction,proto3" json:"end_interaction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebhookResponse) Reset() { *m = WebhookResponse{} }
func (m *WebhookResponse) String() string { return proto.CompactTextString(m) }
func (*WebhookResponse) ProtoMessage() {}
func (*WebhookResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_e44190e355d0ffbc, []int{1}
}
func (m *WebhookResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebhookResponse.Unmarshal(m, b)
}
func (m *WebhookResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebhookResponse.Marshal(b, m, deterministic)
}
func (m *WebhookResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebhookResponse.Merge(m, src)
}
func (m *WebhookResponse) XXX_Size() int {
return xxx_messageInfo_WebhookResponse.Size(m)
}
func (m *WebhookResponse) XXX_DiscardUnknown() {
xxx_messageInfo_WebhookResponse.DiscardUnknown(m)
}
var xxx_messageInfo_WebhookResponse proto.InternalMessageInfo
func (m *WebhookResponse) GetFulfillmentText() string {
if m != nil {
return m.FulfillmentText
}
return ""
}
func (m *WebhookResponse) GetFulfillmentMessages() []*Intent_Message {
if m != nil {
return m.FulfillmentMessages
}
return nil
}
func (m *WebhookResponse) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *WebhookResponse) GetPayload() *_struct.Struct {
if m != nil {
return m.Payload
}
return nil
}
func (m *WebhookResponse) GetOutputContexts() []*Context {
if m != nil {
return m.OutputContexts
}
return nil
}
func (m *WebhookResponse) GetFollowupEventInput() *EventInput {
if m != nil {
return m.FollowupEventInput
}
return nil
}
func (m *WebhookResponse) GetEndInteraction() bool {
if m != nil {
return m.EndInteraction
}
return false
}
// Represents the contents of the original request that was passed to
// the `[Streaming]DetectIntent` call.
type OriginalDetectIntentRequest struct {
// The source of this request, e.g., `google`, `facebook`, `slack`. It is set
// by Dialogflow-owned servers.
Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"`
// Optional. The version of the protocol used for this request.
// This field is AoG-specific.
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// Optional. This field is set to the value of `QueryParameters.payload` field
// passed in the request.
//
// This field is used for the telephony gateway. It should have a
// structure similar to this JSON message:
// <pre>{
// "telephony": {
// "caller_id": "+18558363987"
// }
// }</pre>
// Note: The caller ID field (`caller_id`) will be in
// [E.164 format](https://en.wikipedia.org/wiki/E.164) and is only supported
// for Enterprise Edition and not for Standard Edition agents. When the
// telephony gateway is used with a standard tier agent the `caller_id` field
// above will have a value of `REDACTED_IN_STANDARD_TIER_AGENT`.
Payload *_struct.Struct `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OriginalDetectIntentRequest) Reset() { *m = OriginalDetectIntentRequest{} }
func (m *OriginalDetectIntentRequest) String() string { return proto.CompactTextString(m) }
func (*OriginalDetectIntentRequest) ProtoMessage() {}
func (*OriginalDetectIntentRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_e44190e355d0ffbc, []int{2}
}
func (m *OriginalDetectIntentRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OriginalDetectIntentRequest.Unmarshal(m, b)
}
func (m *OriginalDetectIntentRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OriginalDetectIntentRequest.Marshal(b, m, deterministic)
}
func (m *OriginalDetectIntentRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_OriginalDetectIntentRequest.Merge(m, src)
}
func (m *OriginalDetectIntentRequest) XXX_Size() int {
return xxx_messageInfo_OriginalDetectIntentRequest.Size(m)
}
func (m *OriginalDetectIntentRequest) XXX_DiscardUnknown() {
xxx_messageInfo_OriginalDetectIntentRequest.DiscardUnknown(m)
}
var xxx_messageInfo_OriginalDetectIntentRequest proto.InternalMessageInfo
func (m *OriginalDetectIntentRequest) GetSource() string {
if m != nil {
return m.Source
}
return ""
}
func (m *OriginalDetectIntentRequest) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *OriginalDetectIntentRequest) GetPayload() *_struct.Struct {
if m != nil {
return m.Payload
}
return nil
}
func init() {
proto.RegisterType((*WebhookRequest)(nil), "google.cloud.dialogflow.v2beta1.WebhookRequest")
proto.RegisterType((*WebhookResponse)(nil), "google.cloud.dialogflow.v2beta1.WebhookResponse")
proto.RegisterType((*OriginalDetectIntentRequest)(nil), "google.cloud.dialogflow.v2beta1.OriginalDetectIntentRequest")
}
func init() {
proto.RegisterFile("google/cloud/dialogflow/v2beta1/webhook.proto", fileDescriptor_e44190e355d0ffbc)
}
var fileDescriptor_e44190e355d0ffbc = []byte{
// 603 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcf, 0x6e, 0xd4, 0x30,
0x10, 0xc6, 0x95, 0x5d, 0xe8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xde, 0x58, 0xe6,
0x81, 0x69, 0xe2, 0x70, 0xde, 0xc4, 0x07, 0x2b, 0x1a, 0x2f, 0x18, 0xfe, 0xf3, 0xdf, 0x01, 0x00,
0x00, 0xff, 0xff, 0x42, 0x28, 0x28, 0xef, 0xa8, 0x05, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,153 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/functions/v1beta2/operations.proto
package functions
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
_ "google.golang.org/genproto/googleapis/api/annotations"
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 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 fileDescriptor_25e43fb62395b1f8, []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,proto3" json:"target,omitempty"`
// Type of operation.
Type OperationType `protobuf:"varint,2,opt,name=type,proto3,enum=google.cloud.functions.v1beta2.OperationType" json:"type,omitempty"`
// The original request that started the operation.
Request *any.Any `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OperationMetadataV1Beta2) Reset() { *m = OperationMetadataV1Beta2{} }
func (m *OperationMetadataV1Beta2) String() string { return proto.CompactTextString(m) }
func (*OperationMetadataV1Beta2) ProtoMessage() {}
func (*OperationMetadataV1Beta2) Descriptor() ([]byte, []int) {
return fileDescriptor_25e43fb62395b1f8, []int{0}
}
func (m *OperationMetadataV1Beta2) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OperationMetadataV1Beta2.Unmarshal(m, b)
}
func (m *OperationMetadataV1Beta2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OperationMetadataV1Beta2.Marshal(b, m, deterministic)
}
func (m *OperationMetadataV1Beta2) XXX_Merge(src proto.Message) {
xxx_messageInfo_OperationMetadataV1Beta2.Merge(m, src)
}
func (m *OperationMetadataV1Beta2) XXX_Size() int {
return xxx_messageInfo_OperationMetadataV1Beta2.Size(m)
}
func (m *OperationMetadataV1Beta2) XXX_DiscardUnknown() {
xxx_messageInfo_OperationMetadataV1Beta2.DiscardUnknown(m)
}
var xxx_messageInfo_OperationMetadataV1Beta2 proto.InternalMessageInfo
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() *any.Any {
if m != nil {
return m.Request
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.functions.v1beta2.OperationType", OperationType_name, OperationType_value)
proto.RegisterType((*OperationMetadataV1Beta2)(nil), "google.cloud.functions.v1beta2.OperationMetadataV1Beta2")
}
func init() {
proto.RegisterFile("google/cloud/functions/v1beta2/operations.proto", fileDescriptor_25e43fb62395b1f8)
}
var fileDescriptor_25e43fb62395b1f8 = []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, 0x0a, 0xc8, 0x08, 0xa8, 0x14,
0x90, 0x15, 0x9a, 0x57, 0x36, 0x90, 0xaa, 0x10, 0x53, 0x21, 0xa4, 0xde, 0xb5, 0x9b, 0x0d, 0x7b,
0x6b, 0x4e, 0xcb, 0x74, 0x83, 0xa9, 0xc8, 0xb6, 0x57, 0xed, 0x2f, 0x00, 0xdd, 0x69, 0xf1, 0xdb,
0x13, 0xd3, 0x74, 0x4d, 0x35, 0x7d, 0xe9, 0xf6, 0xf3, 0x54, 0xe7, 0x12, 0xd6, 0x34, 0x8d, 0x39,
0xd3, 0x2e, 0x68, 0x81, 0xce, 0x61, 0x60, 0x4f, 0x8e, 0x07, 0xff, 0xeb, 0x4c, 0x31, 0xb7, 0xd2,
0x02, 0x9d, 0x93, 0xde, 0x2d, 0xfa, 0xbd, 0x1c, 0x2a, 0xf3, 0x67, 0x99, 0x62, 0x81, 0x51, 0x1d,
0x04, 0x0f, 0x62, 0xf6, 0x9e, 0xb2, 0x44, 0xbb, 0xd5, 0x16, 0xe8, 0x1c, 0xf5, 0xce, 0x8b, 0x94,
0xa2, 0x24, 0xf2, 0x44, 0x16, 0x14, 0x8f, 0x6e, 0x42, 0x78, 0xbc, 0x17, 0xe3, 0x34, 0xe0, 0xc5,
0xd4, 0x27, 0x81, 0x37, 0x1b, 0x4f, 0x27, 0x8b, 0xf9, 0xe4, 0xd9, 0x27, 0x83, 0xf1, 0x68, 0x4c,
0x86, 0xf5, 0x7f, 0xce, 0x19, 0x3c, 0x1d, 0x04, 0xc4, 0x9b, 0x91, 0xc5, 0x68, 0x3e, 0x19, 0xe4,
0x0f, 0xea, 0x20, 0x87, 0x73, 0x7f, 0xb8, 0x07, 0x2b, 0x39, 0x1c, 0x92, 0x47, 0xb2, 0x0b, 0xab,
0xfd, 0x4f, 0x00, 0xdb, 0x2b, 0xf9, 0xf6, 0xc7, 0x54, 0x7d, 0x77, 0x54, 0xa0, 0xb2, 0x58, 0xe2,
0xe7, 0xdd, 0x7d, 0xf0, 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

View file

@ -0,0 +1,972 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/kms/v1/resources.proto
package kms
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] specifies how cryptographic operations are performed.
type ProtectionLevel int32
const (
// Not specified.
ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED ProtectionLevel = 0
// Crypto operations are performed in software.
ProtectionLevel_SOFTWARE ProtectionLevel = 1
// Crypto operations are performed in a Hardware Security Module.
ProtectionLevel_HSM ProtectionLevel = 2
)
var ProtectionLevel_name = map[int32]string{
0: "PROTECTION_LEVEL_UNSPECIFIED",
1: "SOFTWARE",
2: "HSM",
}
var ProtectionLevel_value = map[string]int32{
"PROTECTION_LEVEL_UNSPECIFIED": 0,
"SOFTWARE": 1,
"HSM": 2,
}
func (x ProtectionLevel) String() string {
return proto.EnumName(ProtectionLevel_name, int32(x))
}
func (ProtectionLevel) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{0}
}
// [CryptoKeyPurpose][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose] describes the cryptographic capabilities of a
// [CryptoKey][google.cloud.kms.v1.CryptoKey]. A given key can only be used for the operations allowed by
// its purpose.
type CryptoKey_CryptoKeyPurpose int32
const (
// Not specified.
CryptoKey_CRYPTO_KEY_PURPOSE_UNSPECIFIED CryptoKey_CryptoKeyPurpose = 0
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with
// [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] and
// [Decrypt][google.cloud.kms.v1.KeyManagementService.Decrypt].
CryptoKey_ENCRYPT_DECRYPT CryptoKey_CryptoKeyPurpose = 1
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with
// [AsymmetricSign][google.cloud.kms.v1.KeyManagementService.AsymmetricSign] and
// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
CryptoKey_ASYMMETRIC_SIGN CryptoKey_CryptoKeyPurpose = 5
// [CryptoKeys][google.cloud.kms.v1.CryptoKey] with this purpose may be used with
// [AsymmetricDecrypt][google.cloud.kms.v1.KeyManagementService.AsymmetricDecrypt] and
// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
CryptoKey_ASYMMETRIC_DECRYPT CryptoKey_CryptoKeyPurpose = 6
)
var CryptoKey_CryptoKeyPurpose_name = map[int32]string{
0: "CRYPTO_KEY_PURPOSE_UNSPECIFIED",
1: "ENCRYPT_DECRYPT",
5: "ASYMMETRIC_SIGN",
6: "ASYMMETRIC_DECRYPT",
}
var CryptoKey_CryptoKeyPurpose_value = map[string]int32{
"CRYPTO_KEY_PURPOSE_UNSPECIFIED": 0,
"ENCRYPT_DECRYPT": 1,
"ASYMMETRIC_SIGN": 5,
"ASYMMETRIC_DECRYPT": 6,
}
func (x CryptoKey_CryptoKeyPurpose) String() string {
return proto.EnumName(CryptoKey_CryptoKeyPurpose_name, int32(x))
}
func (CryptoKey_CryptoKeyPurpose) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{1, 0}
}
// Attestion formats provided by the HSM.
type KeyOperationAttestation_AttestationFormat int32
const (
KeyOperationAttestation_ATTESTATION_FORMAT_UNSPECIFIED KeyOperationAttestation_AttestationFormat = 0
// Cavium HSM attestation compressed with gzip. Note that this format is
// defined by Cavium and subject to change at any time.
KeyOperationAttestation_CAVIUM_V1_COMPRESSED KeyOperationAttestation_AttestationFormat = 3
)
var KeyOperationAttestation_AttestationFormat_name = map[int32]string{
0: "ATTESTATION_FORMAT_UNSPECIFIED",
3: "CAVIUM_V1_COMPRESSED",
}
var KeyOperationAttestation_AttestationFormat_value = map[string]int32{
"ATTESTATION_FORMAT_UNSPECIFIED": 0,
"CAVIUM_V1_COMPRESSED": 3,
}
func (x KeyOperationAttestation_AttestationFormat) String() string {
return proto.EnumName(KeyOperationAttestation_AttestationFormat_name, int32(x))
}
func (KeyOperationAttestation_AttestationFormat) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{3, 0}
}
// The algorithm of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating what
// parameters must be used for each cryptographic operation.
//
// The
// [GOOGLE_SYMMETRIC_ENCRYPTION][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.GOOGLE_SYMMETRIC_ENCRYPTION]
// algorithm is usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
//
// Algorithms beginning with "RSA_SIGN_" are usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
//
// The fields in the name after "RSA_SIGN_" correspond to the following
// parameters: padding algorithm, modulus bit length, and digest algorithm.
//
// For PSS, the salt length used is equal to the length of digest
// algorithm. For example,
// [RSA_SIGN_PSS_2048_SHA256][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm.RSA_SIGN_PSS_2048_SHA256]
// will use PSS with a salt length of 256 bits or 32 bytes.
//
// Algorithms beginning with "RSA_DECRYPT_" are usable with
// [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_DECRYPT].
//
// The fields in the name after "RSA_DECRYPT_" correspond to the following
// parameters: padding algorithm, modulus bit length, and digest algorithm.
//
// Algorithms beginning with "EC_SIGN_" are usable with [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ASYMMETRIC_SIGN][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ASYMMETRIC_SIGN].
//
// The fields in the name after "EC_SIGN_" correspond to the following
// parameters: elliptic curve, digest algorithm.
type CryptoKeyVersion_CryptoKeyVersionAlgorithm int32
const (
// Not specified.
CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionAlgorithm = 0
// Creates symmetric encryption keys.
CryptoKeyVersion_GOOGLE_SYMMETRIC_ENCRYPTION CryptoKeyVersion_CryptoKeyVersionAlgorithm = 1
// RSASSA-PSS 2048 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 2
// RSASSA-PSS 3072 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 3
// RSASSA-PSS 4096 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PSS_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 4
// RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 5
// RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 6
// RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
CryptoKeyVersion_RSA_SIGN_PKCS1_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 7
// RSAES-OAEP 2048 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_2048_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 8
// RSAES-OAEP 3072 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_3072_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 9
// RSAES-OAEP 4096 bit key with a SHA256 digest.
CryptoKeyVersion_RSA_DECRYPT_OAEP_4096_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 10
// ECDSA on the NIST P-256 curve with a SHA256 digest.
CryptoKeyVersion_EC_SIGN_P256_SHA256 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 12
// ECDSA on the NIST P-384 curve with a SHA384 digest.
CryptoKeyVersion_EC_SIGN_P384_SHA384 CryptoKeyVersion_CryptoKeyVersionAlgorithm = 13
)
var CryptoKeyVersion_CryptoKeyVersionAlgorithm_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED",
1: "GOOGLE_SYMMETRIC_ENCRYPTION",
2: "RSA_SIGN_PSS_2048_SHA256",
3: "RSA_SIGN_PSS_3072_SHA256",
4: "RSA_SIGN_PSS_4096_SHA256",
5: "RSA_SIGN_PKCS1_2048_SHA256",
6: "RSA_SIGN_PKCS1_3072_SHA256",
7: "RSA_SIGN_PKCS1_4096_SHA256",
8: "RSA_DECRYPT_OAEP_2048_SHA256",
9: "RSA_DECRYPT_OAEP_3072_SHA256",
10: "RSA_DECRYPT_OAEP_4096_SHA256",
12: "EC_SIGN_P256_SHA256",
13: "EC_SIGN_P384_SHA384",
}
var CryptoKeyVersion_CryptoKeyVersionAlgorithm_value = map[string]int32{
"CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED": 0,
"GOOGLE_SYMMETRIC_ENCRYPTION": 1,
"RSA_SIGN_PSS_2048_SHA256": 2,
"RSA_SIGN_PSS_3072_SHA256": 3,
"RSA_SIGN_PSS_4096_SHA256": 4,
"RSA_SIGN_PKCS1_2048_SHA256": 5,
"RSA_SIGN_PKCS1_3072_SHA256": 6,
"RSA_SIGN_PKCS1_4096_SHA256": 7,
"RSA_DECRYPT_OAEP_2048_SHA256": 8,
"RSA_DECRYPT_OAEP_3072_SHA256": 9,
"RSA_DECRYPT_OAEP_4096_SHA256": 10,
"EC_SIGN_P256_SHA256": 12,
"EC_SIGN_P384_SHA384": 13,
}
func (x CryptoKeyVersion_CryptoKeyVersionAlgorithm) String() string {
return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionAlgorithm_name, int32(x))
}
func (CryptoKeyVersion_CryptoKeyVersionAlgorithm) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{4, 0}
}
// The state of a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], indicating if it can be used.
type CryptoKeyVersion_CryptoKeyVersionState int32
const (
// Not specified.
CryptoKeyVersion_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionState = 0
// This version is still being generated. It may not be used, enabled,
// disabled, or destroyed yet. Cloud KMS will automatically mark this
// version [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] as soon as the version is ready.
CryptoKeyVersion_PENDING_GENERATION CryptoKeyVersion_CryptoKeyVersionState = 5
// This version may be used for cryptographic operations.
CryptoKeyVersion_ENABLED CryptoKeyVersion_CryptoKeyVersionState = 1
// This version may not be used, but the key material is still available,
// and the version can be placed back into the [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] state.
CryptoKeyVersion_DISABLED CryptoKeyVersion_CryptoKeyVersionState = 2
// This version is destroyed, and the key material is no longer stored.
// A version may not leave this state once entered.
CryptoKeyVersion_DESTROYED CryptoKeyVersion_CryptoKeyVersionState = 3
// This version is scheduled for destruction, and will be destroyed soon.
// Call
// [RestoreCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.RestoreCryptoKeyVersion]
// to put it back into the [DISABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DISABLED] state.
CryptoKeyVersion_DESTROY_SCHEDULED CryptoKeyVersion_CryptoKeyVersionState = 4
)
var CryptoKeyVersion_CryptoKeyVersionState_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_STATE_UNSPECIFIED",
5: "PENDING_GENERATION",
1: "ENABLED",
2: "DISABLED",
3: "DESTROYED",
4: "DESTROY_SCHEDULED",
}
var CryptoKeyVersion_CryptoKeyVersionState_value = map[string]int32{
"CRYPTO_KEY_VERSION_STATE_UNSPECIFIED": 0,
"PENDING_GENERATION": 5,
"ENABLED": 1,
"DISABLED": 2,
"DESTROYED": 3,
"DESTROY_SCHEDULED": 4,
}
func (x CryptoKeyVersion_CryptoKeyVersionState) String() string {
return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionState_name, int32(x))
}
func (CryptoKeyVersion_CryptoKeyVersionState) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{4, 1}
}
// A view for [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]s. Controls the level of detail returned
// for [CryptoKeyVersions][google.cloud.kms.v1.CryptoKeyVersion] in
// [KeyManagementService.ListCryptoKeyVersions][google.cloud.kms.v1.KeyManagementService.ListCryptoKeyVersions] and
// [KeyManagementService.ListCryptoKeys][google.cloud.kms.v1.KeyManagementService.ListCryptoKeys].
type CryptoKeyVersion_CryptoKeyVersionView int32
const (
// Default view for each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Does not include
// the [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation] field.
CryptoKeyVersion_CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED CryptoKeyVersion_CryptoKeyVersionView = 0
// Provides all fields in each [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], including the
// [attestation][google.cloud.kms.v1.CryptoKeyVersion.attestation].
CryptoKeyVersion_FULL CryptoKeyVersion_CryptoKeyVersionView = 1
)
var CryptoKeyVersion_CryptoKeyVersionView_name = map[int32]string{
0: "CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED",
1: "FULL",
}
var CryptoKeyVersion_CryptoKeyVersionView_value = map[string]int32{
"CRYPTO_KEY_VERSION_VIEW_UNSPECIFIED": 0,
"FULL": 1,
}
func (x CryptoKeyVersion_CryptoKeyVersionView) String() string {
return proto.EnumName(CryptoKeyVersion_CryptoKeyVersionView_name, int32(x))
}
func (CryptoKeyVersion_CryptoKeyVersionView) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{4, 2}
}
// A [KeyRing][google.cloud.kms.v1.KeyRing] is a toplevel logical grouping of [CryptoKeys][google.cloud.kms.v1.CryptoKey].
type KeyRing struct {
// Output only. The resource name for the [KeyRing][google.cloud.kms.v1.KeyRing] in the format
// `projects/*/locations/*/keyRings/*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. The time at which this [KeyRing][google.cloud.kms.v1.KeyRing] was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KeyRing) Reset() { *m = KeyRing{} }
func (m *KeyRing) String() string { return proto.CompactTextString(m) }
func (*KeyRing) ProtoMessage() {}
func (*KeyRing) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{0}
}
func (m *KeyRing) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyRing.Unmarshal(m, b)
}
func (m *KeyRing) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyRing.Marshal(b, m, deterministic)
}
func (m *KeyRing) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyRing.Merge(m, src)
}
func (m *KeyRing) XXX_Size() int {
return xxx_messageInfo_KeyRing.Size(m)
}
func (m *KeyRing) XXX_DiscardUnknown() {
xxx_messageInfo_KeyRing.DiscardUnknown(m)
}
var xxx_messageInfo_KeyRing proto.InternalMessageInfo
func (m *KeyRing) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *KeyRing) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
// A [CryptoKey][google.cloud.kms.v1.CryptoKey] represents a logical key that can be used for cryptographic
// operations.
//
// A [CryptoKey][google.cloud.kms.v1.CryptoKey] is made up of one or more [versions][google.cloud.kms.v1.CryptoKeyVersion], which
// represent the actual key material used in cryptographic operations.
type CryptoKey struct {
// Output only. The resource name for this [CryptoKey][google.cloud.kms.v1.CryptoKey] in the format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Output only. A copy of the "primary" [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] that will be used
// by [Encrypt][google.cloud.kms.v1.KeyManagementService.Encrypt] when this [CryptoKey][google.cloud.kms.v1.CryptoKey] is given
// in [EncryptRequest.name][google.cloud.kms.v1.EncryptRequest.name].
//
// The [CryptoKey][google.cloud.kms.v1.CryptoKey]'s primary version can be updated via
// [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion].
//
// All keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] have a
// primary. For other keys, this field will be omitted.
Primary *CryptoKeyVersion `protobuf:"bytes,2,opt,name=primary,proto3" json:"primary,omitempty"`
// The immutable purpose of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
Purpose CryptoKey_CryptoKeyPurpose `protobuf:"varint,3,opt,name=purpose,proto3,enum=google.cloud.kms.v1.CryptoKey_CryptoKeyPurpose" json:"purpose,omitempty"`
// Output only. The time at which this [CryptoKey][google.cloud.kms.v1.CryptoKey] was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// At [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time], the Key Management Service will automatically:
//
// 1. Create a new version of this [CryptoKey][google.cloud.kms.v1.CryptoKey].
// 2. Mark the new version as primary.
//
// Key rotations performed manually via
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] and
// [UpdateCryptoKeyPrimaryVersion][google.cloud.kms.v1.KeyManagementService.UpdateCryptoKeyPrimaryVersion]
// do not affect [next_rotation_time][google.cloud.kms.v1.CryptoKey.next_rotation_time].
//
// Keys with [purpose][google.cloud.kms.v1.CryptoKey.purpose]
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT] support
// automatic rotation. For other keys, this field must be omitted.
NextRotationTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=next_rotation_time,json=nextRotationTime,proto3" json:"next_rotation_time,omitempty"`
// Controls the rate of automatic rotation.
//
// Types that are valid to be assigned to RotationSchedule:
// *CryptoKey_RotationPeriod
RotationSchedule isCryptoKey_RotationSchedule `protobuf_oneof:"rotation_schedule"`
// A template describing settings for new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances.
// The properties of new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] instances created by either
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or
// auto-rotation are controlled by this template.
VersionTemplate *CryptoKeyVersionTemplate `protobuf:"bytes,11,opt,name=version_template,json=versionTemplate,proto3" json:"version_template,omitempty"`
// Labels with user-defined metadata. For more information, see
// [Labeling Keys](/kms/docs/labeling-keys).
Labels map[string]string `protobuf:"bytes,10,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CryptoKey) Reset() { *m = CryptoKey{} }
func (m *CryptoKey) String() string { return proto.CompactTextString(m) }
func (*CryptoKey) ProtoMessage() {}
func (*CryptoKey) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{1}
}
func (m *CryptoKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CryptoKey.Unmarshal(m, b)
}
func (m *CryptoKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CryptoKey.Marshal(b, m, deterministic)
}
func (m *CryptoKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_CryptoKey.Merge(m, src)
}
func (m *CryptoKey) XXX_Size() int {
return xxx_messageInfo_CryptoKey.Size(m)
}
func (m *CryptoKey) XXX_DiscardUnknown() {
xxx_messageInfo_CryptoKey.DiscardUnknown(m)
}
var xxx_messageInfo_CryptoKey proto.InternalMessageInfo
func (m *CryptoKey) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *CryptoKey) GetPrimary() *CryptoKeyVersion {
if m != nil {
return m.Primary
}
return nil
}
func (m *CryptoKey) GetPurpose() CryptoKey_CryptoKeyPurpose {
if m != nil {
return m.Purpose
}
return CryptoKey_CRYPTO_KEY_PURPOSE_UNSPECIFIED
}
func (m *CryptoKey) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *CryptoKey) GetNextRotationTime() *timestamp.Timestamp {
if m != nil {
return m.NextRotationTime
}
return nil
}
type isCryptoKey_RotationSchedule interface {
isCryptoKey_RotationSchedule()
}
type CryptoKey_RotationPeriod struct {
RotationPeriod *duration.Duration `protobuf:"bytes,8,opt,name=rotation_period,json=rotationPeriod,proto3,oneof"`
}
func (*CryptoKey_RotationPeriod) isCryptoKey_RotationSchedule() {}
func (m *CryptoKey) GetRotationSchedule() isCryptoKey_RotationSchedule {
if m != nil {
return m.RotationSchedule
}
return nil
}
func (m *CryptoKey) GetRotationPeriod() *duration.Duration {
if x, ok := m.GetRotationSchedule().(*CryptoKey_RotationPeriod); ok {
return x.RotationPeriod
}
return nil
}
func (m *CryptoKey) GetVersionTemplate() *CryptoKeyVersionTemplate {
if m != nil {
return m.VersionTemplate
}
return nil
}
func (m *CryptoKey) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*CryptoKey) 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 _CryptoKey_OneofMarshaler, _CryptoKey_OneofUnmarshaler, _CryptoKey_OneofSizer, []interface{}{
(*CryptoKey_RotationPeriod)(nil),
}
}
func _CryptoKey_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*CryptoKey)
// rotation_schedule
switch x := m.RotationSchedule.(type) {
case *CryptoKey_RotationPeriod:
b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RotationPeriod); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("CryptoKey.RotationSchedule has unexpected type %T", x)
}
return nil
}
func _CryptoKey_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*CryptoKey)
switch tag {
case 8: // rotation_schedule.rotation_period
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(duration.Duration)
err := b.DecodeMessage(msg)
m.RotationSchedule = &CryptoKey_RotationPeriod{msg}
return true, err
default:
return false, nil
}
}
func _CryptoKey_OneofSizer(msg proto.Message) (n int) {
m := msg.(*CryptoKey)
// rotation_schedule
switch x := m.RotationSchedule.(type) {
case *CryptoKey_RotationPeriod:
s := proto.Size(x.RotationPeriod)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// A [CryptoKeyVersionTemplate][google.cloud.kms.v1.CryptoKeyVersionTemplate] specifies the properties to use when creating
// a new [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion], either manually with
// [CreateCryptoKeyVersion][google.cloud.kms.v1.KeyManagementService.CreateCryptoKeyVersion] or
// automatically as a result of auto-rotation.
type CryptoKeyVersionTemplate struct {
// [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] to use when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on
// this template. Immutable. Defaults to [SOFTWARE][google.cloud.kms.v1.ProtectionLevel.SOFTWARE].
ProtectionLevel ProtectionLevel `protobuf:"varint,1,opt,name=protection_level,json=protectionLevel,proto3,enum=google.cloud.kms.v1.ProtectionLevel" json:"protection_level,omitempty"`
// Required. [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] to use
// when creating a [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] based on this template.
//
// For backwards compatibility, GOOGLE_SYMMETRIC_ENCRYPTION is implied if both
// this field is omitted and [CryptoKey.purpose][google.cloud.kms.v1.CryptoKey.purpose] is
// [ENCRYPT_DECRYPT][google.cloud.kms.v1.CryptoKey.CryptoKeyPurpose.ENCRYPT_DECRYPT].
Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,3,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CryptoKeyVersionTemplate) Reset() { *m = CryptoKeyVersionTemplate{} }
func (m *CryptoKeyVersionTemplate) String() string { return proto.CompactTextString(m) }
func (*CryptoKeyVersionTemplate) ProtoMessage() {}
func (*CryptoKeyVersionTemplate) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{2}
}
func (m *CryptoKeyVersionTemplate) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CryptoKeyVersionTemplate.Unmarshal(m, b)
}
func (m *CryptoKeyVersionTemplate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CryptoKeyVersionTemplate.Marshal(b, m, deterministic)
}
func (m *CryptoKeyVersionTemplate) XXX_Merge(src proto.Message) {
xxx_messageInfo_CryptoKeyVersionTemplate.Merge(m, src)
}
func (m *CryptoKeyVersionTemplate) XXX_Size() int {
return xxx_messageInfo_CryptoKeyVersionTemplate.Size(m)
}
func (m *CryptoKeyVersionTemplate) XXX_DiscardUnknown() {
xxx_messageInfo_CryptoKeyVersionTemplate.DiscardUnknown(m)
}
var xxx_messageInfo_CryptoKeyVersionTemplate proto.InternalMessageInfo
func (m *CryptoKeyVersionTemplate) GetProtectionLevel() ProtectionLevel {
if m != nil {
return m.ProtectionLevel
}
return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED
}
func (m *CryptoKeyVersionTemplate) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
if m != nil {
return m.Algorithm
}
return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
}
// Contains an HSM-generated attestation about a key operation.
type KeyOperationAttestation struct {
// Output only. The format of the attestation data.
Format KeyOperationAttestation_AttestationFormat `protobuf:"varint,4,opt,name=format,proto3,enum=google.cloud.kms.v1.KeyOperationAttestation_AttestationFormat" json:"format,omitempty"`
// Output only. The attestation data provided by the HSM when the key
// operation was performed.
Content []byte `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *KeyOperationAttestation) Reset() { *m = KeyOperationAttestation{} }
func (m *KeyOperationAttestation) String() string { return proto.CompactTextString(m) }
func (*KeyOperationAttestation) ProtoMessage() {}
func (*KeyOperationAttestation) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{3}
}
func (m *KeyOperationAttestation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_KeyOperationAttestation.Unmarshal(m, b)
}
func (m *KeyOperationAttestation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_KeyOperationAttestation.Marshal(b, m, deterministic)
}
func (m *KeyOperationAttestation) XXX_Merge(src proto.Message) {
xxx_messageInfo_KeyOperationAttestation.Merge(m, src)
}
func (m *KeyOperationAttestation) XXX_Size() int {
return xxx_messageInfo_KeyOperationAttestation.Size(m)
}
func (m *KeyOperationAttestation) XXX_DiscardUnknown() {
xxx_messageInfo_KeyOperationAttestation.DiscardUnknown(m)
}
var xxx_messageInfo_KeyOperationAttestation proto.InternalMessageInfo
func (m *KeyOperationAttestation) GetFormat() KeyOperationAttestation_AttestationFormat {
if m != nil {
return m.Format
}
return KeyOperationAttestation_ATTESTATION_FORMAT_UNSPECIFIED
}
func (m *KeyOperationAttestation) GetContent() []byte {
if m != nil {
return m.Content
}
return nil
}
// A [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] represents an individual cryptographic key, and the
// associated key material.
//
// An [ENABLED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.ENABLED] version can be
// used for cryptographic operations.
//
// For security reasons, the raw cryptographic key material represented by a
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] can never be viewed or exported. It can only be used to
// encrypt, decrypt, or sign data when an authorized user or application invokes
// Cloud KMS.
type CryptoKeyVersion struct {
// Output only. The resource name for this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] in the format
// `projects/*/locations/*/keyRings/*/cryptoKeys/*/cryptoKeyVersions/*`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The current state of the [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
State CryptoKeyVersion_CryptoKeyVersionState `protobuf:"varint,3,opt,name=state,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionState" json:"state,omitempty"`
// Output only. The [ProtectionLevel][google.cloud.kms.v1.ProtectionLevel] describing how crypto operations are
// performed with this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion].
ProtectionLevel ProtectionLevel `protobuf:"varint,7,opt,name=protection_level,json=protectionLevel,proto3,enum=google.cloud.kms.v1.ProtectionLevel" json:"protection_level,omitempty"`
// Output only. The [CryptoKeyVersionAlgorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] that this
// [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] supports.
Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,10,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
// Output only. Statement that was generated and signed by the HSM at key
// creation time. Use this statement to verify attributes of the key as stored
// on the HSM, independently of Google. Only provided for key versions with
// [protection_level][google.cloud.kms.v1.CryptoKeyVersion.protection_level] [HSM][google.cloud.kms.v1.ProtectionLevel.HSM].
Attestation *KeyOperationAttestation `protobuf:"bytes,8,opt,name=attestation,proto3" json:"attestation,omitempty"`
// Output only. The time at which this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] was created.
CreateTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material was
// generated.
GenerateTime *timestamp.Timestamp `protobuf:"bytes,11,opt,name=generate_time,json=generateTime,proto3" json:"generate_time,omitempty"`
// Output only. The time this [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]'s key material is scheduled
// for destruction. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
// [DESTROY_SCHEDULED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROY_SCHEDULED].
DestroyTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=destroy_time,json=destroyTime,proto3" json:"destroy_time,omitempty"`
// Output only. The time this CryptoKeyVersion's key material was
// destroyed. Only present if [state][google.cloud.kms.v1.CryptoKeyVersion.state] is
// [DESTROYED][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionState.DESTROYED].
DestroyEventTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=destroy_event_time,json=destroyEventTime,proto3" json:"destroy_event_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CryptoKeyVersion) Reset() { *m = CryptoKeyVersion{} }
func (m *CryptoKeyVersion) String() string { return proto.CompactTextString(m) }
func (*CryptoKeyVersion) ProtoMessage() {}
func (*CryptoKeyVersion) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{4}
}
func (m *CryptoKeyVersion) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CryptoKeyVersion.Unmarshal(m, b)
}
func (m *CryptoKeyVersion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CryptoKeyVersion.Marshal(b, m, deterministic)
}
func (m *CryptoKeyVersion) XXX_Merge(src proto.Message) {
xxx_messageInfo_CryptoKeyVersion.Merge(m, src)
}
func (m *CryptoKeyVersion) XXX_Size() int {
return xxx_messageInfo_CryptoKeyVersion.Size(m)
}
func (m *CryptoKeyVersion) XXX_DiscardUnknown() {
xxx_messageInfo_CryptoKeyVersion.DiscardUnknown(m)
}
var xxx_messageInfo_CryptoKeyVersion proto.InternalMessageInfo
func (m *CryptoKeyVersion) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *CryptoKeyVersion) GetState() CryptoKeyVersion_CryptoKeyVersionState {
if m != nil {
return m.State
}
return CryptoKeyVersion_CRYPTO_KEY_VERSION_STATE_UNSPECIFIED
}
func (m *CryptoKeyVersion) GetProtectionLevel() ProtectionLevel {
if m != nil {
return m.ProtectionLevel
}
return ProtectionLevel_PROTECTION_LEVEL_UNSPECIFIED
}
func (m *CryptoKeyVersion) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
if m != nil {
return m.Algorithm
}
return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
}
func (m *CryptoKeyVersion) GetAttestation() *KeyOperationAttestation {
if m != nil {
return m.Attestation
}
return nil
}
func (m *CryptoKeyVersion) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *CryptoKeyVersion) GetGenerateTime() *timestamp.Timestamp {
if m != nil {
return m.GenerateTime
}
return nil
}
func (m *CryptoKeyVersion) GetDestroyTime() *timestamp.Timestamp {
if m != nil {
return m.DestroyTime
}
return nil
}
func (m *CryptoKeyVersion) GetDestroyEventTime() *timestamp.Timestamp {
if m != nil {
return m.DestroyEventTime
}
return nil
}
// The public key for a given [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]. Obtained via
// [GetPublicKey][google.cloud.kms.v1.KeyManagementService.GetPublicKey].
type PublicKey struct {
// The public key, encoded in PEM format. For more information, see the
// [RFC 7468](https://tools.ietf.org/html/rfc7468) sections for
// [General Considerations](https://tools.ietf.org/html/rfc7468#section-2) and
// [Textual Encoding of Subject Public Key Info]
// (https://tools.ietf.org/html/rfc7468#section-13).
Pem string `protobuf:"bytes,1,opt,name=pem,proto3" json:"pem,omitempty"`
// The [Algorithm][google.cloud.kms.v1.CryptoKeyVersion.CryptoKeyVersionAlgorithm] associated
// with this key.
Algorithm CryptoKeyVersion_CryptoKeyVersionAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm" json:"algorithm,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PublicKey) Reset() { *m = PublicKey{} }
func (m *PublicKey) String() string { return proto.CompactTextString(m) }
func (*PublicKey) ProtoMessage() {}
func (*PublicKey) Descriptor() ([]byte, []int) {
return fileDescriptor_e40e1384d35a80c5, []int{5}
}
func (m *PublicKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicKey.Unmarshal(m, b)
}
func (m *PublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PublicKey.Marshal(b, m, deterministic)
}
func (m *PublicKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublicKey.Merge(m, src)
}
func (m *PublicKey) XXX_Size() int {
return xxx_messageInfo_PublicKey.Size(m)
}
func (m *PublicKey) XXX_DiscardUnknown() {
xxx_messageInfo_PublicKey.DiscardUnknown(m)
}
var xxx_messageInfo_PublicKey proto.InternalMessageInfo
func (m *PublicKey) GetPem() string {
if m != nil {
return m.Pem
}
return ""
}
func (m *PublicKey) GetAlgorithm() CryptoKeyVersion_CryptoKeyVersionAlgorithm {
if m != nil {
return m.Algorithm
}
return CryptoKeyVersion_CRYPTO_KEY_VERSION_ALGORITHM_UNSPECIFIED
}
func init() {
proto.RegisterEnum("google.cloud.kms.v1.ProtectionLevel", ProtectionLevel_name, ProtectionLevel_value)
proto.RegisterEnum("google.cloud.kms.v1.CryptoKey_CryptoKeyPurpose", CryptoKey_CryptoKeyPurpose_name, CryptoKey_CryptoKeyPurpose_value)
proto.RegisterEnum("google.cloud.kms.v1.KeyOperationAttestation_AttestationFormat", KeyOperationAttestation_AttestationFormat_name, KeyOperationAttestation_AttestationFormat_value)
proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionAlgorithm", CryptoKeyVersion_CryptoKeyVersionAlgorithm_name, CryptoKeyVersion_CryptoKeyVersionAlgorithm_value)
proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionState", CryptoKeyVersion_CryptoKeyVersionState_name, CryptoKeyVersion_CryptoKeyVersionState_value)
proto.RegisterEnum("google.cloud.kms.v1.CryptoKeyVersion_CryptoKeyVersionView", CryptoKeyVersion_CryptoKeyVersionView_name, CryptoKeyVersion_CryptoKeyVersionView_value)
proto.RegisterType((*KeyRing)(nil), "google.cloud.kms.v1.KeyRing")
proto.RegisterType((*CryptoKey)(nil), "google.cloud.kms.v1.CryptoKey")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.kms.v1.CryptoKey.LabelsEntry")
proto.RegisterType((*CryptoKeyVersionTemplate)(nil), "google.cloud.kms.v1.CryptoKeyVersionTemplate")
proto.RegisterType((*KeyOperationAttestation)(nil), "google.cloud.kms.v1.KeyOperationAttestation")
proto.RegisterType((*CryptoKeyVersion)(nil), "google.cloud.kms.v1.CryptoKeyVersion")
proto.RegisterType((*PublicKey)(nil), "google.cloud.kms.v1.PublicKey")
}
func init() {
proto.RegisterFile("google/cloud/kms/v1/resources.proto", fileDescriptor_e40e1384d35a80c5)
}
var fileDescriptor_e40e1384d35a80c5 = []byte{
// 1197 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5d, 0x6e, 0xdb, 0x46,
0x10, 0x0e, 0x25, 0xcb, 0xb2, 0x46, 0x4e, 0x4c, 0xaf, 0xf3, 0xa3, 0xb8, 0x41, 0x62, 0x28, 0x29,
0x6a, 0x04, 0xa9, 0x14, 0xcb, 0x4e, 0xea, 0x34, 0x68, 0x03, 0x5a, 0x5a, 0x4b, 0xac, 0x7e, 0xc8,
0x2c, 0x69, 0xa5, 0x0e, 0x52, 0x10, 0xb4, 0xbc, 0x51, 0x04, 0x8b, 0x3f, 0x20, 0x29, 0x35, 0x02,
0x7a, 0x8d, 0xbe, 0xf4, 0x02, 0x05, 0x7a, 0x86, 0x9e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0xd6, 0xd1, 0x22, 0x63, 0xdc, 0xfe,
0x37, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x00, 0x2e, 0x55, 0x1a, 0x0c, 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,427 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/location/locations.proto
package location
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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
// The request message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
type ListLocationsRequest struct {
// The resource that owns the locations collection, if applicable.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The standard list filter.
Filter string `protobuf:"bytes,2,opt,name=filter,proto3" json:"filter,omitempty"`
// The standard list page size.
PageSize int32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
// The standard list page token.
PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListLocationsRequest) Reset() { *m = ListLocationsRequest{} }
func (m *ListLocationsRequest) String() string { return proto.CompactTextString(m) }
func (*ListLocationsRequest) ProtoMessage() {}
func (*ListLocationsRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_3903434ffd69ff4c, []int{0}
}
func (m *ListLocationsRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListLocationsRequest.Unmarshal(m, b)
}
func (m *ListLocationsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListLocationsRequest.Marshal(b, m, deterministic)
}
func (m *ListLocationsRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListLocationsRequest.Merge(m, src)
}
func (m *ListLocationsRequest) XXX_Size() int {
return xxx_messageInfo_ListLocationsRequest.Size(m)
}
func (m *ListLocationsRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListLocationsRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListLocationsRequest proto.InternalMessageInfo
func (m *ListLocationsRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *ListLocationsRequest) GetFilter() string {
if m != nil {
return m.Filter
}
return ""
}
func (m *ListLocationsRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListLocationsRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
// The response message for [Locations.ListLocations][google.cloud.location.Locations.ListLocations].
type ListLocationsResponse struct {
// A list of locations that matches the specified filter in the request.
Locations []*Location `protobuf:"bytes,1,rep,name=locations,proto3" json:"locations,omitempty"`
// The standard List next-page token.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListLocationsResponse) Reset() { *m = ListLocationsResponse{} }
func (m *ListLocationsResponse) String() string { return proto.CompactTextString(m) }
func (*ListLocationsResponse) ProtoMessage() {}
func (*ListLocationsResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_3903434ffd69ff4c, []int{1}
}
func (m *ListLocationsResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListLocationsResponse.Unmarshal(m, b)
}
func (m *ListLocationsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListLocationsResponse.Marshal(b, m, deterministic)
}
func (m *ListLocationsResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListLocationsResponse.Merge(m, src)
}
func (m *ListLocationsResponse) XXX_Size() int {
return xxx_messageInfo_ListLocationsResponse.Size(m)
}
func (m *ListLocationsResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListLocationsResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListLocationsResponse proto.InternalMessageInfo
func (m *ListLocationsResponse) GetLocations() []*Location {
if m != nil {
return m.Locations
}
return nil
}
func (m *ListLocationsResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for [Locations.GetLocation][google.cloud.location.Locations.GetLocation].
type GetLocationRequest struct {
// Resource name for the location.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetLocationRequest) Reset() { *m = GetLocationRequest{} }
func (m *GetLocationRequest) String() string { return proto.CompactTextString(m) }
func (*GetLocationRequest) ProtoMessage() {}
func (*GetLocationRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_3903434ffd69ff4c, []int{2}
}
func (m *GetLocationRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLocationRequest.Unmarshal(m, b)
}
func (m *GetLocationRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLocationRequest.Marshal(b, m, deterministic)
}
func (m *GetLocationRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLocationRequest.Merge(m, src)
}
func (m *GetLocationRequest) XXX_Size() int {
return xxx_messageInfo_GetLocationRequest.Size(m)
}
func (m *GetLocationRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLocationRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLocationRequest proto.InternalMessageInfo
func (m *GetLocationRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A resource that represents Google Cloud Platform location.
type Location struct {
// Resource name for the location, which may vary between implementations.
// For example: `"projects/example-project/locations/us-east1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The canonical id for this location. For example: `"us-east1"`.
LocationId string `protobuf:"bytes,4,opt,name=location_id,json=locationId,proto3" json:"location_id,omitempty"`
// The friendly name for this location, typically a nearby city name.
// For example, "Tokyo".
DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"`
// Cross-service attributes for the location. For example
//
// {"cloud.googleapis.com/region": "us-east1"}
Labels map[string]string `protobuf:"bytes,2,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Service-specific metadata. For example the available capacity at the given
// location.
Metadata *any.Any `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Location) Reset() { *m = Location{} }
func (m *Location) String() string { return proto.CompactTextString(m) }
func (*Location) ProtoMessage() {}
func (*Location) Descriptor() ([]byte, []int) {
return fileDescriptor_3903434ffd69ff4c, []int{3}
}
func (m *Location) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Location.Unmarshal(m, b)
}
func (m *Location) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Location.Marshal(b, m, deterministic)
}
func (m *Location) XXX_Merge(src proto.Message) {
xxx_messageInfo_Location.Merge(m, src)
}
func (m *Location) XXX_Size() int {
return xxx_messageInfo_Location.Size(m)
}
func (m *Location) XXX_DiscardUnknown() {
xxx_messageInfo_Location.DiscardUnknown(m)
}
var xxx_messageInfo_Location proto.InternalMessageInfo
func (m *Location) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Location) GetLocationId() string {
if m != nil {
return m.LocationId
}
return ""
}
func (m *Location) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *Location) GetLabels() map[string]string {
if m != nil {
return m.Labels
}
return nil
}
func (m *Location) GetMetadata() *any.Any {
if m != nil {
return m.Metadata
}
return nil
}
func init() {
proto.RegisterType((*ListLocationsRequest)(nil), "google.cloud.location.ListLocationsRequest")
proto.RegisterType((*ListLocationsResponse)(nil), "google.cloud.location.ListLocationsResponse")
proto.RegisterType((*GetLocationRequest)(nil), "google.cloud.location.GetLocationRequest")
proto.RegisterType((*Location)(nil), "google.cloud.location.Location")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.location.Location.LabelsEntry")
}
// 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
// LocationsClient is the client API for Locations service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type LocationsClient interface {
// Lists information about the supported locations for this service.
ListLocations(ctx context.Context, in *ListLocationsRequest, opts ...grpc.CallOption) (*ListLocationsResponse, error)
// Gets information about a location.
GetLocation(ctx context.Context, in *GetLocationRequest, opts ...grpc.CallOption) (*Location, error)
}
type locationsClient struct {
cc *grpc.ClientConn
}
func NewLocationsClient(cc *grpc.ClientConn) LocationsClient {
return &locationsClient{cc}
}
func (c *locationsClient) ListLocations(ctx context.Context, in *ListLocationsRequest, opts ...grpc.CallOption) (*ListLocationsResponse, error) {
out := new(ListLocationsResponse)
err := c.cc.Invoke(ctx, "/google.cloud.location.Locations/ListLocations", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *locationsClient) GetLocation(ctx context.Context, in *GetLocationRequest, opts ...grpc.CallOption) (*Location, error) {
out := new(Location)
err := c.cc.Invoke(ctx, "/google.cloud.location.Locations/GetLocation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// LocationsServer is the server API for Locations service.
type LocationsServer interface {
// Lists information about the supported locations for this service.
ListLocations(context.Context, *ListLocationsRequest) (*ListLocationsResponse, error)
// Gets information about a location.
GetLocation(context.Context, *GetLocationRequest) (*Location, error)
}
func RegisterLocationsServer(s *grpc.Server, srv LocationsServer) {
s.RegisterService(&_Locations_serviceDesc, srv)
}
func _Locations_ListLocations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListLocationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LocationsServer).ListLocations(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.location.Locations/ListLocations",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LocationsServer).ListLocations(ctx, req.(*ListLocationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Locations_GetLocation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLocationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(LocationsServer).GetLocation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.location.Locations/GetLocation",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(LocationsServer).GetLocation(ctx, req.(*GetLocationRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Locations_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.location.Locations",
HandlerType: (*LocationsServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListLocations",
Handler: _Locations_ListLocations_Handler,
},
{
MethodName: "GetLocation",
Handler: _Locations_GetLocation_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/location/locations.proto",
}
func init() {
proto.RegisterFile("google/cloud/location/locations.proto", fileDescriptor_3903434ffd69ff4c)
}
var fileDescriptor_3903434ffd69ff4c = []byte{
// 527 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0xd6, 0x3a, 0x4d, 0x94, 0x8c, 0x29, 0xa0, 0x55, 0x8a, 0xdc, 0x00, 0x4a, 0x62, 0x04, 0xa4,
0x05, 0x79, 0x21, 0x5c, 0xf8, 0x51, 0x0e, 0x14, 0x21, 0x84, 0x14, 0xa1, 0xc8, 0x70, 0xe2, 0x12,
0x6d, 0xe2, 0xad, 0x65, 0xea, 0xec, 0x1a, 0xef, 0xa6, 0xc2, 0x45, 0xed, 0x01, 0xf1, 0x06, 0xe5,
0x21, 0x78, 0x1f, 0x5e, 0x81, 0x87, 0xe0, 0x88, 0xbc, 0xfe, 0x49, 0x28, 0x2e, 0xe5, 0xb6, 0x3b,
0xf3, 0x7d, 0xf3, 0xcd, 0xb7, 0x33, 0x36, 0xdc, 0xf6, 0x85, 0xf0, 0x43, 0x46, 0xe6, 0xa1, 0x58,
0x7a, 0x24, 0x14, 0x73, 0xaa, 0x02, 0xc1, 0xcb, 0x83, 0x74, 0xa2, 0x58, 0x28, 0x81, 0xb7, 0x32,
0x98, 0xa3, 0x61, 0x4e, 0x91, 0xed, 0xdc, 0xc8, 0xd9, 0x34, 0x0a, 0x08, 0xe5, 0x5c, 0xa8, 0x75,
0x52, 0x67, 0x3b, 0xcf, 0xea, 0xdb, 0x6c, 0xb9, 0x4f, 0x28, 0x4f, 0xb2, 0x94, 0x7d, 0x02, 0xed,
0x71, 0x20, 0xd5, 0xb8, 0x90, 0x71, 0xd9, 0xc7, 0x25, 0x93, 0x0a, 0x63, 0xd8, 0xe0, 0x74, 0xc1,
0x2c, 0xd4, 0x43, 0x83, 0x96, 0xab, 0xcf, 0xf8, 0x1a, 0x34, 0xf6, 0x83,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0x85, 0xf0, 0x55, 0xa8, 0x1d, 0xb0, 0x24, 0x37, 0x97, 0x1e, 0x71,
0x1b, 0xea, 0x87, 0x34, 0x5c, 0xb2, 0xfc, 0x11, 0xb3, 0xcb, 0x53, 0xe3, 0x31, 0x1a, 0x7e, 0x37,
0xa0, 0x55, 0x4e, 0x0f, 0x9f, 0x22, 0xd8, 0xfc, 0x63, 0x9e, 0xf8, 0x5c, 0x07, 0x15, 0x5b, 0xd7,
0xb9, 0xff, 0x7f, 0xe0, 0x6c, 0x45, 0xec, 0xbb, 0x5f, 0x7e, 0xfc, 0x3c, 0x35, 0xfa, 0xb8, 0x4b,
0x0e, 0x1f, 0x92, 0xcf, 0xe9, 0x93, 0x8e, 0xa2, 0x58, 0x7c, 0x60, 0x73, 0x25, 0xc9, 0xee, 0xf1,
0xea, 0xd3, 0xc1, 0x5f, 0x11, 0x98, 0x6b, 0x53, 0xc6, 0x3b, 0xe7, 0xc8, 0xfc, 0xbd, 0x09, 0x9d,
0x8b, 0x76, 0xce, 0xde, 0xd1, 0x4d, 0xdc, 0xc2, 0xfd, 0xaa, 0x26, 0x56, 0x3d, 0x90, 0xdd, 0xe3,
0x3d, 0x01, 0xdb, 0x73, 0xb1, 0xa8, 0x2e, 0xb8, 0x77, 0xb9, 0xf4, 0x37, 0x49, 0x67, 0x34, 0x41,
0xef, 0x47, 0x39, 0xd0, 0x17, 0x21, 0xe5, 0xbe, 0x23, 0x62, 0x9f, 0xf8, 0x8c, 0xeb, 0x09, 0x92,
0x2c, 0x45, 0xa3, 0x40, 0x9e, 0xf9, 0x61, 0x3c, 0x2b, 0x0e, 0xbf, 0x10, 0x9a, 0x35, 0x34, 0xf8,
0xd1, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x27, 0xd7, 0x9e, 0x57, 0x5c, 0x04, 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,196 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/ml/v1/operation_metadata.proto
package ml
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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 fileDescriptor_6a63a989e77eed3e, []int{0, 0}
}
// Represents the metadata of the long-running operation.
type OperationMetadata struct {
// The time the operation was submitted.
CreateTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// The time operation processing started.
StartTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"`
// The time operation processing completed.
EndTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=end_time,json=endTime,proto3" 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,proto3" json:"is_cancellation_requested,omitempty"`
// The operation type.
OperationType OperationMetadata_OperationType `protobuf:"varint,5,opt,name=operation_type,json=operationType,proto3,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,proto3" json:"model_name,omitempty"`
// Contains the version associated with the operation.
Version *Version `protobuf:"bytes,7,opt,name=version,proto3" json:"version,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OperationMetadata) Reset() { *m = OperationMetadata{} }
func (m *OperationMetadata) String() string { return proto.CompactTextString(m) }
func (*OperationMetadata) ProtoMessage() {}
func (*OperationMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_6a63a989e77eed3e, []int{0}
}
func (m *OperationMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OperationMetadata.Unmarshal(m, b)
}
func (m *OperationMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OperationMetadata.Marshal(b, m, deterministic)
}
func (m *OperationMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_OperationMetadata.Merge(m, src)
}
func (m *OperationMetadata) XXX_Size() int {
return xxx_messageInfo_OperationMetadata.Size(m)
}
func (m *OperationMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_OperationMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_OperationMetadata proto.InternalMessageInfo
func (m *OperationMetadata) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *OperationMetadata) GetStartTime() *timestamp.Timestamp {
if m != nil {
return m.StartTime
}
return nil
}
func (m *OperationMetadata) GetEndTime() *timestamp.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.RegisterEnum("google.cloud.ml.v1.OperationMetadata_OperationType", OperationMetadata_OperationType_name, OperationMetadata_OperationType_value)
proto.RegisterType((*OperationMetadata)(nil), "google.cloud.ml.v1.OperationMetadata")
}
func init() {
proto.RegisterFile("google/cloud/ml/v1/operation_metadata.proto", fileDescriptor_6a63a989e77eed3e)
}
var fileDescriptor_6a63a989e77eed3e = []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,
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x92, 0xdc, 0x57, 0x10, 0x1f, 0xa9, 0xcd, 0x23,
0x7e, 0x8f, 0x90, 0x0b, 0x45, 0xb2, 0x12, 0x46, 0xfb, 0x63, 0x6f, 0xd2, 0x8f, 0xfb, 0x56, 0x59,
0x32, 0xfb, 0xda, 0x5e, 0x03, 0xb5, 0xe6, 0x4a, 0x8e, 0x7a, 0xf6, 0xb1, 0x6f, 0x1f, 0xbb, 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,376 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/ml/v1/prediction_service.proto
package ml
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
httpbody "google.golang.org/genproto/googleapis/api/httpbody"
math "math"
)
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
// 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,proto3" json:"name,omitempty"`
//
// Required. The prediction request body.
HttpBody *httpbody.HttpBody `protobuf:"bytes,2,opt,name=http_body,json=httpBody,proto3" json:"http_body,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PredictRequest) Reset() { *m = PredictRequest{} }
func (m *PredictRequest) String() string { return proto.CompactTextString(m) }
func (*PredictRequest) ProtoMessage() {}
func (*PredictRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ca7339bffd66a462, []int{0}
}
func (m *PredictRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PredictRequest.Unmarshal(m, b)
}
func (m *PredictRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PredictRequest.Marshal(b, m, deterministic)
}
func (m *PredictRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_PredictRequest.Merge(m, src)
}
func (m *PredictRequest) XXX_Size() int {
return xxx_messageInfo_PredictRequest.Size(m)
}
func (m *PredictRequest) XXX_DiscardUnknown() {
xxx_messageInfo_PredictRequest.DiscardUnknown(m)
}
var xxx_messageInfo_PredictRequest proto.InternalMessageInfo
func (m *PredictRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *PredictRequest) GetHttpBody() *httpbody.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
// OnlinePredictionServiceClient is the client API for OnlinePredictionService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OnlinePredictionServiceClient interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(ctx context.Context, in *PredictRequest, opts ...grpc.CallOption) (*httpbody.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) (*httpbody.HttpBody, error) {
out := new(httpbody.HttpBody)
err := c.cc.Invoke(ctx, "/google.cloud.ml.v1.OnlinePredictionService/Predict", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OnlinePredictionServiceServer is the server API for OnlinePredictionService service.
type OnlinePredictionServiceServer interface {
// Performs prediction on the data in the request.
//
// **** REMOVE FROM GENERATED DOCUMENTATION
Predict(context.Context, *PredictRequest) (*httpbody.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", fileDescriptor_ca7339bffd66a462)
}
var fileDescriptor_ca7339bffd66a462 = []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, 0x65, 0x5a, 0x83, 0x65, 0x8e, 0x58, 0x7b, 0x46, 0x7c,
0xbc, 0xb5, 0x5d, 0x59, 0x6b, 0x96, 0x50, 0x6c, 0xfc, 0x2a, 0x79, 0x40, 0xfb, 0x99, 0x17, 0x9a,
0xf3, 0xe7, 0x35, 0xaf, 0x2d, 0xc6, 0xe8, 0x9f, 0x66, 0x25, 0x1f, 0x44, 0xc3, 0x68, 0xd4, 0x9f,
0xb7, 0x33, 0x4e, 0x51, 0xdf, 0xf1, 0x16, 0x8e, 0x38, 0xe8, 0x0d, 0xa3, 0xd1, 0xde, 0xe4, 0x80,
0x04, 0x1b, 0xcc, 0x48, 0x72, 0x6b, 0xad, 0x99, 0x41, 0xb1, 0x99, 0xef, 0xae, 0xc2, 0x34, 0x79,
0x8f, 0xd0, 0xd1, 0x9d, 0x56, 0x52, 0xf3, 0xec, 0x27, 0xc8, 0xbd, 0xcf, 0x81, 0x35, 0xda, 0x09,
0x8f, 0x38, 0x21, 0xdd, 0x34, 0xe4, 0xb7, 0xa3, 0xf8, 0x4f, 0xa9, 0xe4, 0xfc, 0xed, 0xf3, 0xeb,
0xa3, 0x77, 0x96, 0x9c, 0xba, 0xb2, 0x5e, 0x9c, 0xcd, 0x1b, 0x53, 0xc1, 0x13, 0xcf, 0x6d, 0x4d,
0xc7, 0xe3, 0xd7, 0x69, 0xe8, 0x6f, 0x1a, 0x8d, 0x67, 0x0a, 0xc5, 0x39, 0x94, 0x1d, 0x25, 0x77,
0xae, 0x49, 0x67, 0x87, 0x1d, 0x83, 0x99, 0xab, 0x26, 0x8b, 0x1e, 0xaf, 0x02, 0x43, 0x80, 0x62,
0x5a, 0x10, 0xa8, 0x04, 0x15, 0x5c, 0xb7, 0xc5, 0x51, 0xbf, 0x62, 0x46, 0xd6, 0xdb, 0xbf, 0x76,
0x5d, 0xaa, 0xe5, 0xff, 0x16, 0x70, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x81, 0x8e, 0x25, 0xca,
0xd5, 0x01, 0x00, 0x00,
}

View file

@ -0,0 +1,233 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/ml/v1/project_service.proto
package ml
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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
// 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,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetConfigRequest) Reset() { *m = GetConfigRequest{} }
func (m *GetConfigRequest) String() string { return proto.CompactTextString(m) }
func (*GetConfigRequest) ProtoMessage() {}
func (*GetConfigRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9d9ea4142d12cde4, []int{0}
}
func (m *GetConfigRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConfigRequest.Unmarshal(m, b)
}
func (m *GetConfigRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetConfigRequest.Marshal(b, m, deterministic)
}
func (m *GetConfigRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetConfigRequest.Merge(m, src)
}
func (m *GetConfigRequest) XXX_Size() int {
return xxx_messageInfo_GetConfigRequest.Size(m)
}
func (m *GetConfigRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetConfigRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetConfigRequest proto.InternalMessageInfo
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,proto3" json:"service_account,omitempty"`
// The project number for `service_account`.
ServiceAccountProject int64 `protobuf:"varint,2,opt,name=service_account_project,json=serviceAccountProject,proto3" json:"service_account_project,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetConfigResponse) Reset() { *m = GetConfigResponse{} }
func (m *GetConfigResponse) String() string { return proto.CompactTextString(m) }
func (*GetConfigResponse) ProtoMessage() {}
func (*GetConfigResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9d9ea4142d12cde4, []int{1}
}
func (m *GetConfigResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetConfigResponse.Unmarshal(m, b)
}
func (m *GetConfigResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetConfigResponse.Marshal(b, m, deterministic)
}
func (m *GetConfigResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetConfigResponse.Merge(m, src)
}
func (m *GetConfigResponse) XXX_Size() int {
return xxx_messageInfo_GetConfigResponse.Size(m)
}
func (m *GetConfigResponse) XXX_DiscardUnknown() {
xxx_messageInfo_GetConfigResponse.DiscardUnknown(m)
}
var xxx_messageInfo_GetConfigResponse proto.InternalMessageInfo
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
// ProjectManagementServiceClient is the client API for ProjectManagementService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
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 := c.cc.Invoke(ctx, "/google.cloud.ml.v1.ProjectManagementService/GetConfig", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ProjectManagementServiceServer is the 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", fileDescriptor_9d9ea4142d12cde4)
}
var fileDescriptor_9d9ea4142d12cde4 = []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, 0x59, 0xbd, 0x82, 0x70, 0x89, 0xf6, 0x41, 0xc9, 0x21, 0x3c, 0x8d, 0xc1, 0x07, 0x4a, 0xc9,
0xa2, 0x15, 0x06, 0x1a, 0x59, 0x2b, 0xeb, 0xd6, 0x87, 0x55, 0xdd, 0x0e, 0x64, 0x6d, 0x8a, 0xf3,
0x0e, 0xad, 0x07, 0xda, 0x21, 0x2b, 0xe9, 0xff, 0x91, 0xc8, 0x73, 0x1c, 0xdb, 0x90, 0x34, 0xcb,
0xa9, 0x7d, 0x11, 0xbb, 0xf4, 0x84, 0x6c, 0xce, 0x80, 0xa3, 0x14, 0xa0, 0x51, 0x6b, 0x65, 0xdd,
0x85, 0xe1, 0xc6, 0x5f, 0xc1, 0x20, 0x0e, 0x0f, 0x3f, 0x32, 0xd2, 0x48, 0xf5, 0xb5, 0xb0, 0x42,
0x82, 0x01, 0x1b, 0x6e, 0x22, 0x4a, 0x5f, 0x33, 0x52, 0xff, 0xf5, 0x44, 0x77, 0xd9, 0x7c, 0x76,
0x36, 0x1b, 0xad, 0xb9, 0xf7, 0x0f, 0x15, 0x83, 0xb5, 0x3b, 0x6f, 0x9f, 0x5f, 0xef, 0xb5, 0x1d,
0xba, 0x3d, 0x59, 0xf5, 0xf3, 0x64, 0x01, 0xe7, 0xc9, 0xaf, 0xe7, 0x07, 0x2f, 0xa7, 0xf2, 0x47,
0xd0, 0x57, 0xa4, 0x99, 0xa3, 0x99, 0x7b, 0x54, 0x38, 0xc5, 0xca, 0x5e, 0x7f, 0x3d, 0x79, 0x4f,
0x8e, 0x07, 0x93, 0x8d, 0x0f, 0xb2, 0xdb, 0xe3, 0x84, 0x4b, 0xd4, 0xc2, 0x4a, 0x86, 0x85, 0xe4,
0x12, 0x6c, 0x75, 0x0f, 0x1e, 0x47, 0xc2, 0x29, 0x3f, 0x7d, 0xee, 0x33, 0xa3, 0xef, 0x96, 0x2a,
0xe0, 0xe8, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xd0, 0xa5, 0x43, 0x33, 0x0e, 0x02, 0x00, 0x00,
}

View file

@ -0,0 +1,236 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/oslogin/common/common.proto
package common
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// The POSIX account information associated with a Google account.
type PosixAccount struct {
// Only one POSIX account can be marked as primary.
Primary bool `protobuf:"varint,1,opt,name=primary,proto3" json:"primary,omitempty"`
// The username of the POSIX account.
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// The user ID.
Uid int64 `protobuf:"varint,3,opt,name=uid,proto3" json:"uid,omitempty"`
// The default group ID.
Gid int64 `protobuf:"varint,4,opt,name=gid,proto3" json:"gid,omitempty"`
// The path to the home directory for this account.
HomeDirectory string `protobuf:"bytes,5,opt,name=home_directory,json=homeDirectory,proto3" json:"home_directory,omitempty"`
// The path to the logic shell for this account.
Shell string `protobuf:"bytes,6,opt,name=shell,proto3" json:"shell,omitempty"`
// The GECOS (user information) entry for this account.
Gecos string `protobuf:"bytes,7,opt,name=gecos,proto3" json:"gecos,omitempty"`
// System identifier for which account the username or uid applies to.
// By default, the empty value is used.
SystemId string `protobuf:"bytes,8,opt,name=system_id,json=systemId,proto3" json:"system_id,omitempty"`
// Output only. A POSIX account identifier.
AccountId string `protobuf:"bytes,9,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PosixAccount) Reset() { *m = PosixAccount{} }
func (m *PosixAccount) String() string { return proto.CompactTextString(m) }
func (*PosixAccount) ProtoMessage() {}
func (*PosixAccount) Descriptor() ([]byte, []int) {
return fileDescriptor_7fa58776520b3f24, []int{0}
}
func (m *PosixAccount) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PosixAccount.Unmarshal(m, b)
}
func (m *PosixAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PosixAccount.Marshal(b, m, deterministic)
}
func (m *PosixAccount) XXX_Merge(src proto.Message) {
xxx_messageInfo_PosixAccount.Merge(m, src)
}
func (m *PosixAccount) XXX_Size() int {
return xxx_messageInfo_PosixAccount.Size(m)
}
func (m *PosixAccount) XXX_DiscardUnknown() {
xxx_messageInfo_PosixAccount.DiscardUnknown(m)
}
var xxx_messageInfo_PosixAccount proto.InternalMessageInfo
func (m *PosixAccount) GetPrimary() bool {
if m != nil {
return m.Primary
}
return false
}
func (m *PosixAccount) GetUsername() string {
if m != nil {
return m.Username
}
return ""
}
func (m *PosixAccount) GetUid() int64 {
if m != nil {
return m.Uid
}
return 0
}
func (m *PosixAccount) GetGid() int64 {
if m != nil {
return m.Gid
}
return 0
}
func (m *PosixAccount) GetHomeDirectory() string {
if m != nil {
return m.HomeDirectory
}
return ""
}
func (m *PosixAccount) GetShell() string {
if m != nil {
return m.Shell
}
return ""
}
func (m *PosixAccount) GetGecos() string {
if m != nil {
return m.Gecos
}
return ""
}
func (m *PosixAccount) GetSystemId() string {
if m != nil {
return m.SystemId
}
return ""
}
func (m *PosixAccount) GetAccountId() string {
if m != nil {
return m.AccountId
}
return ""
}
// The SSH public key information associated with a Google account.
type SshPublicKey struct {
// Public key text in SSH format, defined by
// <a href="https://www.ietf.org/rfc/rfc4253.txt" target="_blank">RFC4253</a>
// section 6.6.
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
// An expiration time in microseconds since epoch.
ExpirationTimeUsec int64 `protobuf:"varint,2,opt,name=expiration_time_usec,json=expirationTimeUsec,proto3" json:"expiration_time_usec,omitempty"`
// Output only. The SHA-256 fingerprint of the SSH public key.
Fingerprint string `protobuf:"bytes,3,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SshPublicKey) Reset() { *m = SshPublicKey{} }
func (m *SshPublicKey) String() string { return proto.CompactTextString(m) }
func (*SshPublicKey) ProtoMessage() {}
func (*SshPublicKey) Descriptor() ([]byte, []int) {
return fileDescriptor_7fa58776520b3f24, []int{1}
}
func (m *SshPublicKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SshPublicKey.Unmarshal(m, b)
}
func (m *SshPublicKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SshPublicKey.Marshal(b, m, deterministic)
}
func (m *SshPublicKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_SshPublicKey.Merge(m, src)
}
func (m *SshPublicKey) XXX_Size() int {
return xxx_messageInfo_SshPublicKey.Size(m)
}
func (m *SshPublicKey) XXX_DiscardUnknown() {
xxx_messageInfo_SshPublicKey.DiscardUnknown(m)
}
var xxx_messageInfo_SshPublicKey proto.InternalMessageInfo
func (m *SshPublicKey) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *SshPublicKey) GetExpirationTimeUsec() int64 {
if m != nil {
return m.ExpirationTimeUsec
}
return 0
}
func (m *SshPublicKey) GetFingerprint() string {
if m != nil {
return m.Fingerprint
}
return ""
}
func init() {
proto.RegisterType((*PosixAccount)(nil), "google.cloud.oslogin.common.PosixAccount")
proto.RegisterType((*SshPublicKey)(nil), "google.cloud.oslogin.common.SshPublicKey")
}
func init() {
proto.RegisterFile("google/cloud/oslogin/common/common.proto", fileDescriptor_7fa58776520b3f24)
}
var fileDescriptor_7fa58776520b3f24 = []byte{
// 406 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x92, 0x41, 0x6b, 0x14, 0x31,
0x14, 0xc7, 0x99, 0xae, 0x6d, 0x77, 0xe2, 0x2a, 0x12, 0x7a, 0x08, 0x5d, 0xc5, 0xa5,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0xf7, 0x5b, 0x8e, 0x02, 0x00, 0x00,
}

View file

@ -0,0 +1,757 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/oslogin/v1/oslogin.proto
package oslogin
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
common "google.golang.org/genproto/googleapis/cloud/oslogin/common"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The user profile information used for logging in to a virtual machine on
// Google Compute Engine.
type LoginProfile struct {
// The primary email address that uniquely identifies the user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The list of POSIX accounts associated with the user.
PosixAccounts []*common.PosixAccount `protobuf:"bytes,2,rep,name=posix_accounts,json=posixAccounts,proto3" json:"posix_accounts,omitempty"`
// A map from SSH public key fingerprint to the associated key object.
SshPublicKeys map[string]*common.SshPublicKey `protobuf:"bytes,3,rep,name=ssh_public_keys,json=sshPublicKeys,proto3" json:"ssh_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Indicates if the user is suspended. A suspended user cannot log in but
// their profile information is retained.
Suspended bool `protobuf:"varint,4,opt,name=suspended,proto3" json:"suspended,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoginProfile) Reset() { *m = LoginProfile{} }
func (m *LoginProfile) String() string { return proto.CompactTextString(m) }
func (*LoginProfile) ProtoMessage() {}
func (*LoginProfile) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{0}
}
func (m *LoginProfile) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoginProfile.Unmarshal(m, b)
}
func (m *LoginProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoginProfile.Marshal(b, m, deterministic)
}
func (m *LoginProfile) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoginProfile.Merge(m, src)
}
func (m *LoginProfile) XXX_Size() int {
return xxx_messageInfo_LoginProfile.Size(m)
}
func (m *LoginProfile) XXX_DiscardUnknown() {
xxx_messageInfo_LoginProfile.DiscardUnknown(m)
}
var xxx_messageInfo_LoginProfile proto.InternalMessageInfo
func (m *LoginProfile) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *LoginProfile) GetPosixAccounts() []*common.PosixAccount {
if m != nil {
return m.PosixAccounts
}
return nil
}
func (m *LoginProfile) GetSshPublicKeys() map[string]*common.SshPublicKey {
if m != nil {
return m.SshPublicKeys
}
return nil
}
func (m *LoginProfile) GetSuspended() bool {
if m != nil {
return m.Suspended
}
return false
}
// A request message for deleting a POSIX account entry.
type DeletePosixAccountRequest struct {
// A reference to the POSIX account to update. POSIX accounts are identified
// by the project ID they are associated with. A reference to the POSIX
// account is in format `users/{user}/projects/{project}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeletePosixAccountRequest) Reset() { *m = DeletePosixAccountRequest{} }
func (m *DeletePosixAccountRequest) String() string { return proto.CompactTextString(m) }
func (*DeletePosixAccountRequest) ProtoMessage() {}
func (*DeletePosixAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{1}
}
func (m *DeletePosixAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeletePosixAccountRequest.Unmarshal(m, b)
}
func (m *DeletePosixAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeletePosixAccountRequest.Marshal(b, m, deterministic)
}
func (m *DeletePosixAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeletePosixAccountRequest.Merge(m, src)
}
func (m *DeletePosixAccountRequest) XXX_Size() int {
return xxx_messageInfo_DeletePosixAccountRequest.Size(m)
}
func (m *DeletePosixAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeletePosixAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeletePosixAccountRequest proto.InternalMessageInfo
func (m *DeletePosixAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for deleting an SSH public key.
type DeleteSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteSshPublicKeyRequest) Reset() { *m = DeleteSshPublicKeyRequest{} }
func (m *DeleteSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSshPublicKeyRequest) ProtoMessage() {}
func (*DeleteSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{2}
}
func (m *DeleteSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *DeleteSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *DeleteSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteSshPublicKeyRequest.Merge(m, src)
}
func (m *DeleteSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Size(m)
}
func (m *DeleteSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteSshPublicKeyRequest proto.InternalMessageInfo
func (m *DeleteSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving the login profile information for a user.
type GetLoginProfileRequest struct {
// The unique ID for the user in format `users/{user}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetLoginProfileRequest) Reset() { *m = GetLoginProfileRequest{} }
func (m *GetLoginProfileRequest) String() string { return proto.CompactTextString(m) }
func (*GetLoginProfileRequest) ProtoMessage() {}
func (*GetLoginProfileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{3}
}
func (m *GetLoginProfileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLoginProfileRequest.Unmarshal(m, b)
}
func (m *GetLoginProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLoginProfileRequest.Marshal(b, m, deterministic)
}
func (m *GetLoginProfileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLoginProfileRequest.Merge(m, src)
}
func (m *GetLoginProfileRequest) XXX_Size() int {
return xxx_messageInfo_GetLoginProfileRequest.Size(m)
}
func (m *GetLoginProfileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLoginProfileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLoginProfileRequest proto.InternalMessageInfo
func (m *GetLoginProfileRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving an SSH public key.
type GetSshPublicKeyRequest struct {
// The fingerprint of the public key to retrieve. Public keys are identified
// by their SHA-256 fingerprint. The fingerprint of the public key is in
// format `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSshPublicKeyRequest) Reset() { *m = GetSshPublicKeyRequest{} }
func (m *GetSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*GetSshPublicKeyRequest) ProtoMessage() {}
func (*GetSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{4}
}
func (m *GetSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *GetSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *GetSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSshPublicKeyRequest.Merge(m, src)
}
func (m *GetSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_GetSshPublicKeyRequest.Size(m)
}
func (m *GetSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSshPublicKeyRequest proto.InternalMessageInfo
func (m *GetSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for importing an SSH public key.
type ImportSshPublicKeyRequest struct {
// The unique ID for the user in format `users/{user}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// The project ID of the Google Cloud Platform project.
ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyRequest) Reset() { *m = ImportSshPublicKeyRequest{} }
func (m *ImportSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyRequest) ProtoMessage() {}
func (*ImportSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{5}
}
func (m *ImportSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyRequest.Merge(m, src)
}
func (m *ImportSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyRequest.Size(m)
}
func (m *ImportSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyRequest proto.InternalMessageInfo
func (m *ImportSshPublicKeyRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ImportSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *ImportSshPublicKeyRequest) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
// A response message for importing an SSH public key.
type ImportSshPublicKeyResponse struct {
// The login profile information for the user.
LoginProfile *LoginProfile `protobuf:"bytes,1,opt,name=login_profile,json=loginProfile,proto3" json:"login_profile,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyResponse) Reset() { *m = ImportSshPublicKeyResponse{} }
func (m *ImportSshPublicKeyResponse) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyResponse) ProtoMessage() {}
func (*ImportSshPublicKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{6}
}
func (m *ImportSshPublicKeyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyResponse.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyResponse.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyResponse.Merge(m, src)
}
func (m *ImportSshPublicKeyResponse) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyResponse.Size(m)
}
func (m *ImportSshPublicKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyResponse proto.InternalMessageInfo
func (m *ImportSshPublicKeyResponse) GetLoginProfile() *LoginProfile {
if m != nil {
return m.LoginProfile
}
return nil
}
// A request message for updating an SSH public key.
type UpdateSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// Mask to control which fields get updated. Updates all if not present.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateSshPublicKeyRequest) Reset() { *m = UpdateSshPublicKeyRequest{} }
func (m *UpdateSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateSshPublicKeyRequest) ProtoMessage() {}
func (*UpdateSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_4485a75683c132f1, []int{7}
}
func (m *UpdateSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *UpdateSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *UpdateSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateSshPublicKeyRequest.Merge(m, src)
}
func (m *UpdateSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Size(m)
}
func (m *UpdateSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateSshPublicKeyRequest proto.InternalMessageInfo
func (m *UpdateSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpdateSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *UpdateSshPublicKeyRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func init() {
proto.RegisterType((*LoginProfile)(nil), "google.cloud.oslogin.v1.LoginProfile")
proto.RegisterMapType((map[string]*common.SshPublicKey)(nil), "google.cloud.oslogin.v1.LoginProfile.SshPublicKeysEntry")
proto.RegisterType((*DeletePosixAccountRequest)(nil), "google.cloud.oslogin.v1.DeletePosixAccountRequest")
proto.RegisterType((*DeleteSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1.DeleteSshPublicKeyRequest")
proto.RegisterType((*GetLoginProfileRequest)(nil), "google.cloud.oslogin.v1.GetLoginProfileRequest")
proto.RegisterType((*GetSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1.GetSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1.ImportSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyResponse)(nil), "google.cloud.oslogin.v1.ImportSshPublicKeyResponse")
proto.RegisterType((*UpdateSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1.UpdateSshPublicKeyRequest")
}
// 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
// OsLoginServiceClient is the client API for OsLoginService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OsLoginServiceClient interface {
// Deletes a POSIX account.
DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
}
type osLoginServiceClient struct {
cc *grpc.ClientConn
}
func NewOsLoginServiceClient(cc *grpc.ClientConn) OsLoginServiceClient {
return &osLoginServiceClient{cc}
}
func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) {
out := new(LoginProfile)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) {
out := new(ImportSshPublicKeyResponse)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OsLoginServiceServer is the server API for OsLoginService service.
type OsLoginServiceServer interface {
// Deletes a POSIX account.
DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*common.SshPublicKey, error)
}
func RegisterOsLoginServiceServer(s *grpc.Server, srv OsLoginServiceServer) {
s.RegisterService(&_OsLoginService_serviceDesc, srv)
}
func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePosixAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/DeletePosixAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/DeleteSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLoginProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/GetLoginProfile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/GetSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/ImportSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1.OsLoginService/UpdateSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OsLoginService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.oslogin.v1.OsLoginService",
HandlerType: (*OsLoginServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeletePosixAccount",
Handler: _OsLoginService_DeletePosixAccount_Handler,
},
{
MethodName: "DeleteSshPublicKey",
Handler: _OsLoginService_DeleteSshPublicKey_Handler,
},
{
MethodName: "GetLoginProfile",
Handler: _OsLoginService_GetLoginProfile_Handler,
},
{
MethodName: "GetSshPublicKey",
Handler: _OsLoginService_GetSshPublicKey_Handler,
},
{
MethodName: "ImportSshPublicKey",
Handler: _OsLoginService_ImportSshPublicKey_Handler,
},
{
MethodName: "UpdateSshPublicKey",
Handler: _OsLoginService_UpdateSshPublicKey_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/oslogin/v1/oslogin.proto",
}
func init() {
proto.RegisterFile("google/cloud/oslogin/v1/oslogin.proto", fileDescriptor_4485a75683c132f1)
}
var fileDescriptor_4485a75683c132f1 = []byte{
// 774 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6e, 0xd3, 0x40,
0x10, 0x96, 0x93, 0x52, 0xe8, 0x26, 0x6d, 0xd1, 0x1e, 0xda, 0xd4, 0x6d, 0xd5, 0x60, 0x51, 0x35,
0x44, 0xc8, 0x56, 0x52, 0x0e, 0x25, 0x15, 0x54, 0x14, 0x4a, 0x55, 0x7e, 0xd4, 0x28, 0x15, 0x3d,
0xa0, 0x4a, 0xc1, 0x75, 0xb6, 0xae, 0x89, 0xed, 0x5d, 0xbc, 0x76, 0x44, 0x84, 0x7a, 0xe1, 0xc2,
0x85, 0x13, 0x9c, 0x38, 0x22, 0x6e, 0x5c, 0x78, 0x02, 0x78, 0x00, 0x24, 0x4e, 0x3c, 0x01, 0x12,
0x0f, 0x82, 0xbc, 0x5e, 0xb7, 0x4e, 0x6c, 0xa7, 0xae, 0xc4, 0x29, 0xbb, 0x9e, 0xf9, 0x66, 0xbf,
0xfd, 0x76, 0xbe, 0x51, 0xc0, 0xb2, 0x8e, 0xb1, 0x6e, 0x22, 0x45, 0x33, 0xb1, 0xd7, 0x51, 0x30,
0x35, 0xb1, 0x6e, 0xd8, 0x4a, 0xaf, 0x16, 0x2e, 0x65, 0xe2, 0x60, 0x17, 0xc3, 0xd9, 0x20, 0x4d,
0x66, 0x69, 0x72, 0x18, 0xeb, 0xd5, 0xc4, 0x05, 0x8e, 0x57, 0x89, 0xa1, 0xa8, 0xb6, 0x8d, 0x5d,
0xd5, 0x35, 0xb0, 0x4d, 0x03, 0x98, 0x58, 0x49, 0xac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 0x44, 0x1d, 0x9b, 0xaa, 0xad, 0xcb, 0xd8, 0xd1, 0x15, 0x1d, 0xd9, 0xcc,
0x24, 0x4a, 0x10, 0x52, 0x89, 0x41, 0x63, 0xff, 0x6b, 0xd6, 0xf9, 0xf2, 0x6b, 0x6e, 0x76, 0x3b,
0x28, 0x70, 0x9f, 0x9d, 0xc4, 0xab, 0xcb, 0xfb, 0xb5, 0x9f, 0x61, 0xe4, 0x80, 0x45, 0x0e, 0x78,
0xe4, 0x60, 0xbf, 0x76, 0x38, 0xce, 0xca, 0xaf, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x79,
0x9f, 0xd6, 0x35, 0x09, 0x00, 0x00,
}

View file

@ -0,0 +1,756 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/oslogin/v1alpha/oslogin.proto
package oslogin
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
common "google.golang.org/genproto/googleapis/cloud/oslogin/common"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The user profile information used for logging in to a virtual machine on
// Google Compute Engine.
type LoginProfile struct {
// A unique user ID for identifying the user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The list of POSIX accounts associated with the Directory API user.
PosixAccounts []*common.PosixAccount `protobuf:"bytes,2,rep,name=posix_accounts,json=posixAccounts,proto3" json:"posix_accounts,omitempty"`
// A map from SSH public key fingerprint to the associated key object.
SshPublicKeys map[string]*common.SshPublicKey `protobuf:"bytes,3,rep,name=ssh_public_keys,json=sshPublicKeys,proto3" json:"ssh_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Indicates if the user is suspended.
Suspended bool `protobuf:"varint,4,opt,name=suspended,proto3" json:"suspended,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoginProfile) Reset() { *m = LoginProfile{} }
func (m *LoginProfile) String() string { return proto.CompactTextString(m) }
func (*LoginProfile) ProtoMessage() {}
func (*LoginProfile) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{0}
}
func (m *LoginProfile) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoginProfile.Unmarshal(m, b)
}
func (m *LoginProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoginProfile.Marshal(b, m, deterministic)
}
func (m *LoginProfile) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoginProfile.Merge(m, src)
}
func (m *LoginProfile) XXX_Size() int {
return xxx_messageInfo_LoginProfile.Size(m)
}
func (m *LoginProfile) XXX_DiscardUnknown() {
xxx_messageInfo_LoginProfile.DiscardUnknown(m)
}
var xxx_messageInfo_LoginProfile proto.InternalMessageInfo
func (m *LoginProfile) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *LoginProfile) GetPosixAccounts() []*common.PosixAccount {
if m != nil {
return m.PosixAccounts
}
return nil
}
func (m *LoginProfile) GetSshPublicKeys() map[string]*common.SshPublicKey {
if m != nil {
return m.SshPublicKeys
}
return nil
}
func (m *LoginProfile) GetSuspended() bool {
if m != nil {
return m.Suspended
}
return false
}
// A request message for deleting a POSIX account entry.
type DeletePosixAccountRequest struct {
// A reference to the POSIX account to update. POSIX accounts are identified
// by the project ID they are associated with. A reference to the POSIX
// account is in format `users/{user}/projects/{project}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeletePosixAccountRequest) Reset() { *m = DeletePosixAccountRequest{} }
func (m *DeletePosixAccountRequest) String() string { return proto.CompactTextString(m) }
func (*DeletePosixAccountRequest) ProtoMessage() {}
func (*DeletePosixAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{1}
}
func (m *DeletePosixAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeletePosixAccountRequest.Unmarshal(m, b)
}
func (m *DeletePosixAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeletePosixAccountRequest.Marshal(b, m, deterministic)
}
func (m *DeletePosixAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeletePosixAccountRequest.Merge(m, src)
}
func (m *DeletePosixAccountRequest) XXX_Size() int {
return xxx_messageInfo_DeletePosixAccountRequest.Size(m)
}
func (m *DeletePosixAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeletePosixAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeletePosixAccountRequest proto.InternalMessageInfo
func (m *DeletePosixAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for deleting an SSH public key.
type DeleteSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteSshPublicKeyRequest) Reset() { *m = DeleteSshPublicKeyRequest{} }
func (m *DeleteSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSshPublicKeyRequest) ProtoMessage() {}
func (*DeleteSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{2}
}
func (m *DeleteSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *DeleteSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *DeleteSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteSshPublicKeyRequest.Merge(m, src)
}
func (m *DeleteSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Size(m)
}
func (m *DeleteSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteSshPublicKeyRequest proto.InternalMessageInfo
func (m *DeleteSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving the login profile information for a user.
type GetLoginProfileRequest struct {
// The unique ID for the user in format `users/{user}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetLoginProfileRequest) Reset() { *m = GetLoginProfileRequest{} }
func (m *GetLoginProfileRequest) String() string { return proto.CompactTextString(m) }
func (*GetLoginProfileRequest) ProtoMessage() {}
func (*GetLoginProfileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{3}
}
func (m *GetLoginProfileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLoginProfileRequest.Unmarshal(m, b)
}
func (m *GetLoginProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLoginProfileRequest.Marshal(b, m, deterministic)
}
func (m *GetLoginProfileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLoginProfileRequest.Merge(m, src)
}
func (m *GetLoginProfileRequest) XXX_Size() int {
return xxx_messageInfo_GetLoginProfileRequest.Size(m)
}
func (m *GetLoginProfileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLoginProfileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLoginProfileRequest proto.InternalMessageInfo
func (m *GetLoginProfileRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving an SSH public key.
type GetSshPublicKeyRequest struct {
// The fingerprint of the public key to retrieve. Public keys are identified
// by their SHA-256 fingerprint. The fingerprint of the public key is in
// format `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSshPublicKeyRequest) Reset() { *m = GetSshPublicKeyRequest{} }
func (m *GetSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*GetSshPublicKeyRequest) ProtoMessage() {}
func (*GetSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{4}
}
func (m *GetSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *GetSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *GetSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSshPublicKeyRequest.Merge(m, src)
}
func (m *GetSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_GetSshPublicKeyRequest.Size(m)
}
func (m *GetSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSshPublicKeyRequest proto.InternalMessageInfo
func (m *GetSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for importing an SSH public key.
type ImportSshPublicKeyRequest struct {
// The unique ID for the user in format `users/{user}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// The project ID of the Google Cloud Platform project.
ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyRequest) Reset() { *m = ImportSshPublicKeyRequest{} }
func (m *ImportSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyRequest) ProtoMessage() {}
func (*ImportSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{5}
}
func (m *ImportSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyRequest.Merge(m, src)
}
func (m *ImportSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyRequest.Size(m)
}
func (m *ImportSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyRequest proto.InternalMessageInfo
func (m *ImportSshPublicKeyRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ImportSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *ImportSshPublicKeyRequest) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
// A response message for importing an SSH public key.
type ImportSshPublicKeyResponse struct {
// The login profile information for the user.
LoginProfile *LoginProfile `protobuf:"bytes,1,opt,name=login_profile,json=loginProfile,proto3" json:"login_profile,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyResponse) Reset() { *m = ImportSshPublicKeyResponse{} }
func (m *ImportSshPublicKeyResponse) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyResponse) ProtoMessage() {}
func (*ImportSshPublicKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{6}
}
func (m *ImportSshPublicKeyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyResponse.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyResponse.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyResponse.Merge(m, src)
}
func (m *ImportSshPublicKeyResponse) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyResponse.Size(m)
}
func (m *ImportSshPublicKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyResponse proto.InternalMessageInfo
func (m *ImportSshPublicKeyResponse) GetLoginProfile() *LoginProfile {
if m != nil {
return m.LoginProfile
}
return nil
}
// A request message for updating an SSH public key.
type UpdateSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// Mask to control which fields get updated. Updates all if not present.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateSshPublicKeyRequest) Reset() { *m = UpdateSshPublicKeyRequest{} }
func (m *UpdateSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateSshPublicKeyRequest) ProtoMessage() {}
func (*UpdateSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_9929680849ee8c07, []int{7}
}
func (m *UpdateSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *UpdateSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *UpdateSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateSshPublicKeyRequest.Merge(m, src)
}
func (m *UpdateSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Size(m)
}
func (m *UpdateSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateSshPublicKeyRequest proto.InternalMessageInfo
func (m *UpdateSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpdateSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *UpdateSshPublicKeyRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func init() {
proto.RegisterType((*LoginProfile)(nil), "google.cloud.oslogin.v1alpha.LoginProfile")
proto.RegisterMapType((map[string]*common.SshPublicKey)(nil), "google.cloud.oslogin.v1alpha.LoginProfile.SshPublicKeysEntry")
proto.RegisterType((*DeletePosixAccountRequest)(nil), "google.cloud.oslogin.v1alpha.DeletePosixAccountRequest")
proto.RegisterType((*DeleteSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1alpha.DeleteSshPublicKeyRequest")
proto.RegisterType((*GetLoginProfileRequest)(nil), "google.cloud.oslogin.v1alpha.GetLoginProfileRequest")
proto.RegisterType((*GetSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1alpha.GetSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1alpha.ImportSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyResponse)(nil), "google.cloud.oslogin.v1alpha.ImportSshPublicKeyResponse")
proto.RegisterType((*UpdateSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1alpha.UpdateSshPublicKeyRequest")
}
// 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
// OsLoginServiceClient is the client API for OsLoginService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OsLoginServiceClient interface {
// Deletes a POSIX account.
DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
}
type osLoginServiceClient struct {
cc *grpc.ClientConn
}
func NewOsLoginServiceClient(cc *grpc.ClientConn) OsLoginServiceClient {
return &osLoginServiceClient{cc}
}
func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/DeletePosixAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/DeleteSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) {
out := new(LoginProfile)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/GetLoginProfile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/GetSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) {
out := new(ImportSshPublicKeyResponse)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/ImportSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1alpha.OsLoginService/UpdateSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OsLoginServiceServer is the server API for OsLoginService service.
type OsLoginServiceServer interface {
// Deletes a POSIX account.
DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*common.SshPublicKey, error)
}
func RegisterOsLoginServiceServer(s *grpc.Server, srv OsLoginServiceServer) {
s.RegisterService(&_OsLoginService_serviceDesc, srv)
}
func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePosixAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/DeletePosixAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/DeleteSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLoginProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/GetLoginProfile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/GetSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/ImportSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1alpha.OsLoginService/UpdateSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OsLoginService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.oslogin.v1alpha.OsLoginService",
HandlerType: (*OsLoginServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeletePosixAccount",
Handler: _OsLoginService_DeletePosixAccount_Handler,
},
{
MethodName: "DeleteSshPublicKey",
Handler: _OsLoginService_DeleteSshPublicKey_Handler,
},
{
MethodName: "GetLoginProfile",
Handler: _OsLoginService_GetLoginProfile_Handler,
},
{
MethodName: "GetSshPublicKey",
Handler: _OsLoginService_GetSshPublicKey_Handler,
},
{
MethodName: "ImportSshPublicKey",
Handler: _OsLoginService_ImportSshPublicKey_Handler,
},
{
MethodName: "UpdateSshPublicKey",
Handler: _OsLoginService_UpdateSshPublicKey_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/oslogin/v1alpha/oslogin.proto",
}
func init() {
proto.RegisterFile("google/cloud/oslogin/v1alpha/oslogin.proto", fileDescriptor_9929680849ee8c07)
}
var fileDescriptor_9929680849ee8c07 = []byte{
// 779 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6a, 0xdb, 0x4a,
0x14, 0x46, 0x76, 0x6e, 0x48, 0xc6, 0x4e, 0x72, 0x99, 0x45, 0x70, 0x74, 0x73, 0xc1, 0x88, 0xd0,
0x3a, 0x26, 0x68, 0x88, 0x5b, 0x68, 0x9a, 0x90, 0x86, 0xfc, 0x35, 0x84, 0xb6, 0xc4, 0x38, 0x34,
0x8b, 0x12, 0x30, 0x13, 0x79, 0xa2, 0xa8, 0x96, 0x34, 0x53, 0x8d, 0x14, 0x6a, 0x4a, 0x36, 0x7d,
0x83, 0x12, 0xe8, 0xbe, 0x64, 0xd7, 0x7d, 0x17, 0x5d, 0xf4, 0x05, 0x0a, 0x5d, 0xf5, 0x15, 0x4a,
0x9f, 0xa3, 0x68, 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x0f, 0x92, 0xba,
0x36, 0xbe, 0x63, 0x74, 0x24, 0xb4, 0x3d, 0x01, 0xfd, 0x89, 0xb6, 0x72, 0x07, 0x3d, 0x3a, 0x66,
0xb7, 0xfc, 0xae, 0x5b, 0x7d, 0xde, 0xeb, 0x3d, 0x5b, 0x0d, 0xbf, 0x2a, 0x00, 0xf6, 0x5f, 0x86,
0x51, 0xf5, 0x0c, 0xbc, 0x25, 0xe3, 0x70, 0xbf, 0x25, 0x0a, 0x78, 0x5c, 0xcb, 0xca, 0x7d, 0x2f,
0xf6, 0x9d, 0x2f, 0x0a, 0x28, 0x1b, 0xd4, 0x19, 0x0a, 0x75, 0xa7, 0x28, 0xef, 0x46, 0x3d, 0x5c,
0xa1, 0xba, 0xf2, 0x6a, 0x57, 0x5a, 0x9b, 0xd4, 0xc6, 0xae, 0xa9, 0x53, 0xcf, 0x44, 0x26, 0x71,
0xc5, 0x82, 0xa1, 0x48, 0x85, 0x99, 0xc5, 0xd3, 0xff, 0x36, 0x6d, 0x48, 0xf9, 0x73, 0x6e, 0xf1,
0x20, 0x8a, 0xb2, 0x2b, 0x72, 0xca, 0x14, 0xfa, 0xc9, 0xea, 0x76, 0x68, 0xf6, 0x3d, 0x56, 0x9f,
0x0a, 0xf5, 0xa9, 0x54, 0x9f, 0x9e, 0x44, 0x51, 0xce, 0x26, 0x45, 0xb6, 0x07, 0x7f, 0x02, 0x00,
0x00, 0xff, 0xff, 0xf8, 0xf2, 0xe5, 0x19, 0xa3, 0x09, 0x00, 0x00,
}

View file

@ -0,0 +1,757 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/oslogin/v1beta/oslogin.proto
package oslogin
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
empty "github.com/golang/protobuf/ptypes/empty"
_ "google.golang.org/genproto/googleapis/api/annotations"
common "google.golang.org/genproto/googleapis/cloud/oslogin/common"
field_mask "google.golang.org/genproto/protobuf/field_mask"
math "math"
)
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
// The user profile information used for logging in to a virtual machine on
// Google Compute Engine.
type LoginProfile struct {
// The primary email address that uniquely identifies the user.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The list of POSIX accounts associated with the user.
PosixAccounts []*common.PosixAccount `protobuf:"bytes,2,rep,name=posix_accounts,json=posixAccounts,proto3" json:"posix_accounts,omitempty"`
// A map from SSH public key fingerprint to the associated key object.
SshPublicKeys map[string]*common.SshPublicKey `protobuf:"bytes,3,rep,name=ssh_public_keys,json=sshPublicKeys,proto3" json:"ssh_public_keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Indicates if the user is suspended. A suspended user cannot log in but
// their profile information is retained.
Suspended bool `protobuf:"varint,4,opt,name=suspended,proto3" json:"suspended,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LoginProfile) Reset() { *m = LoginProfile{} }
func (m *LoginProfile) String() string { return proto.CompactTextString(m) }
func (*LoginProfile) ProtoMessage() {}
func (*LoginProfile) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{0}
}
func (m *LoginProfile) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LoginProfile.Unmarshal(m, b)
}
func (m *LoginProfile) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LoginProfile.Marshal(b, m, deterministic)
}
func (m *LoginProfile) XXX_Merge(src proto.Message) {
xxx_messageInfo_LoginProfile.Merge(m, src)
}
func (m *LoginProfile) XXX_Size() int {
return xxx_messageInfo_LoginProfile.Size(m)
}
func (m *LoginProfile) XXX_DiscardUnknown() {
xxx_messageInfo_LoginProfile.DiscardUnknown(m)
}
var xxx_messageInfo_LoginProfile proto.InternalMessageInfo
func (m *LoginProfile) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *LoginProfile) GetPosixAccounts() []*common.PosixAccount {
if m != nil {
return m.PosixAccounts
}
return nil
}
func (m *LoginProfile) GetSshPublicKeys() map[string]*common.SshPublicKey {
if m != nil {
return m.SshPublicKeys
}
return nil
}
func (m *LoginProfile) GetSuspended() bool {
if m != nil {
return m.Suspended
}
return false
}
// A request message for deleting a POSIX account entry.
type DeletePosixAccountRequest struct {
// A reference to the POSIX account to update. POSIX accounts are identified
// by the project ID they are associated with. A reference to the POSIX
// account is in format `users/{user}/projects/{project}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeletePosixAccountRequest) Reset() { *m = DeletePosixAccountRequest{} }
func (m *DeletePosixAccountRequest) String() string { return proto.CompactTextString(m) }
func (*DeletePosixAccountRequest) ProtoMessage() {}
func (*DeletePosixAccountRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{1}
}
func (m *DeletePosixAccountRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeletePosixAccountRequest.Unmarshal(m, b)
}
func (m *DeletePosixAccountRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeletePosixAccountRequest.Marshal(b, m, deterministic)
}
func (m *DeletePosixAccountRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeletePosixAccountRequest.Merge(m, src)
}
func (m *DeletePosixAccountRequest) XXX_Size() int {
return xxx_messageInfo_DeletePosixAccountRequest.Size(m)
}
func (m *DeletePosixAccountRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeletePosixAccountRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeletePosixAccountRequest proto.InternalMessageInfo
func (m *DeletePosixAccountRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for deleting an SSH public key.
type DeleteSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DeleteSshPublicKeyRequest) Reset() { *m = DeleteSshPublicKeyRequest{} }
func (m *DeleteSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteSshPublicKeyRequest) ProtoMessage() {}
func (*DeleteSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{2}
}
func (m *DeleteSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *DeleteSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *DeleteSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_DeleteSshPublicKeyRequest.Merge(m, src)
}
func (m *DeleteSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_DeleteSshPublicKeyRequest.Size(m)
}
func (m *DeleteSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_DeleteSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_DeleteSshPublicKeyRequest proto.InternalMessageInfo
func (m *DeleteSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving the login profile information for a user.
type GetLoginProfileRequest struct {
// The unique ID for the user in format `users/{user}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetLoginProfileRequest) Reset() { *m = GetLoginProfileRequest{} }
func (m *GetLoginProfileRequest) String() string { return proto.CompactTextString(m) }
func (*GetLoginProfileRequest) ProtoMessage() {}
func (*GetLoginProfileRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{3}
}
func (m *GetLoginProfileRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetLoginProfileRequest.Unmarshal(m, b)
}
func (m *GetLoginProfileRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetLoginProfileRequest.Marshal(b, m, deterministic)
}
func (m *GetLoginProfileRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetLoginProfileRequest.Merge(m, src)
}
func (m *GetLoginProfileRequest) XXX_Size() int {
return xxx_messageInfo_GetLoginProfileRequest.Size(m)
}
func (m *GetLoginProfileRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetLoginProfileRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetLoginProfileRequest proto.InternalMessageInfo
func (m *GetLoginProfileRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for retrieving an SSH public key.
type GetSshPublicKeyRequest struct {
// The fingerprint of the public key to retrieve. Public keys are identified
// by their SHA-256 fingerprint. The fingerprint of the public key is in
// format `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetSshPublicKeyRequest) Reset() { *m = GetSshPublicKeyRequest{} }
func (m *GetSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*GetSshPublicKeyRequest) ProtoMessage() {}
func (*GetSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{4}
}
func (m *GetSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *GetSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *GetSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetSshPublicKeyRequest.Merge(m, src)
}
func (m *GetSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_GetSshPublicKeyRequest.Size(m)
}
func (m *GetSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_GetSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_GetSshPublicKeyRequest proto.InternalMessageInfo
func (m *GetSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// A request message for importing an SSH public key.
type ImportSshPublicKeyRequest struct {
// The unique ID for the user in format `users/{user}`.
Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// The project ID of the Google Cloud Platform project.
ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyRequest) Reset() { *m = ImportSshPublicKeyRequest{} }
func (m *ImportSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyRequest) ProtoMessage() {}
func (*ImportSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{5}
}
func (m *ImportSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyRequest.Merge(m, src)
}
func (m *ImportSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyRequest.Size(m)
}
func (m *ImportSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyRequest proto.InternalMessageInfo
func (m *ImportSshPublicKeyRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ImportSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *ImportSshPublicKeyRequest) GetProjectId() string {
if m != nil {
return m.ProjectId
}
return ""
}
// A response message for importing an SSH public key.
type ImportSshPublicKeyResponse struct {
// The login profile information for the user.
LoginProfile *LoginProfile `protobuf:"bytes,1,opt,name=login_profile,json=loginProfile,proto3" json:"login_profile,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ImportSshPublicKeyResponse) Reset() { *m = ImportSshPublicKeyResponse{} }
func (m *ImportSshPublicKeyResponse) String() string { return proto.CompactTextString(m) }
func (*ImportSshPublicKeyResponse) ProtoMessage() {}
func (*ImportSshPublicKeyResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{6}
}
func (m *ImportSshPublicKeyResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ImportSshPublicKeyResponse.Unmarshal(m, b)
}
func (m *ImportSshPublicKeyResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ImportSshPublicKeyResponse.Marshal(b, m, deterministic)
}
func (m *ImportSshPublicKeyResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ImportSshPublicKeyResponse.Merge(m, src)
}
func (m *ImportSshPublicKeyResponse) XXX_Size() int {
return xxx_messageInfo_ImportSshPublicKeyResponse.Size(m)
}
func (m *ImportSshPublicKeyResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ImportSshPublicKeyResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ImportSshPublicKeyResponse proto.InternalMessageInfo
func (m *ImportSshPublicKeyResponse) GetLoginProfile() *LoginProfile {
if m != nil {
return m.LoginProfile
}
return nil
}
// A request message for updating an SSH public key.
type UpdateSshPublicKeyRequest struct {
// The fingerprint of the public key to update. Public keys are identified by
// their SHA-256 fingerprint. The fingerprint of the public key is in format
// `users/{user}/sshPublicKeys/{fingerprint}`.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// The SSH public key and expiration time.
SshPublicKey *common.SshPublicKey `protobuf:"bytes,2,opt,name=ssh_public_key,json=sshPublicKey,proto3" json:"ssh_public_key,omitempty"`
// Mask to control which fields get updated. Updates all if not present.
UpdateMask *field_mask.FieldMask `protobuf:"bytes,3,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *UpdateSshPublicKeyRequest) Reset() { *m = UpdateSshPublicKeyRequest{} }
func (m *UpdateSshPublicKeyRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateSshPublicKeyRequest) ProtoMessage() {}
func (*UpdateSshPublicKeyRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c51261020b887e3b, []int{7}
}
func (m *UpdateSshPublicKeyRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Unmarshal(m, b)
}
func (m *UpdateSshPublicKeyRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Marshal(b, m, deterministic)
}
func (m *UpdateSshPublicKeyRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_UpdateSshPublicKeyRequest.Merge(m, src)
}
func (m *UpdateSshPublicKeyRequest) XXX_Size() int {
return xxx_messageInfo_UpdateSshPublicKeyRequest.Size(m)
}
func (m *UpdateSshPublicKeyRequest) XXX_DiscardUnknown() {
xxx_messageInfo_UpdateSshPublicKeyRequest.DiscardUnknown(m)
}
var xxx_messageInfo_UpdateSshPublicKeyRequest proto.InternalMessageInfo
func (m *UpdateSshPublicKeyRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *UpdateSshPublicKeyRequest) GetSshPublicKey() *common.SshPublicKey {
if m != nil {
return m.SshPublicKey
}
return nil
}
func (m *UpdateSshPublicKeyRequest) GetUpdateMask() *field_mask.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
func init() {
proto.RegisterType((*LoginProfile)(nil), "google.cloud.oslogin.v1beta.LoginProfile")
proto.RegisterMapType((map[string]*common.SshPublicKey)(nil), "google.cloud.oslogin.v1beta.LoginProfile.SshPublicKeysEntry")
proto.RegisterType((*DeletePosixAccountRequest)(nil), "google.cloud.oslogin.v1beta.DeletePosixAccountRequest")
proto.RegisterType((*DeleteSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1beta.DeleteSshPublicKeyRequest")
proto.RegisterType((*GetLoginProfileRequest)(nil), "google.cloud.oslogin.v1beta.GetLoginProfileRequest")
proto.RegisterType((*GetSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1beta.GetSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1beta.ImportSshPublicKeyRequest")
proto.RegisterType((*ImportSshPublicKeyResponse)(nil), "google.cloud.oslogin.v1beta.ImportSshPublicKeyResponse")
proto.RegisterType((*UpdateSshPublicKeyRequest)(nil), "google.cloud.oslogin.v1beta.UpdateSshPublicKeyRequest")
}
// 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
// OsLoginServiceClient is the client API for OsLoginService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type OsLoginServiceClient interface {
// Deletes a POSIX account.
DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error)
}
type osLoginServiceClient struct {
cc *grpc.ClientConn
}
func NewOsLoginServiceClient(cc *grpc.ClientConn) OsLoginServiceClient {
return &osLoginServiceClient{cc}
}
func (c *osLoginServiceClient) DeletePosixAccount(ctx context.Context, in *DeletePosixAccountRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/DeletePosixAccount", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) DeleteSshPublicKey(ctx context.Context, in *DeleteSshPublicKeyRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
out := new(empty.Empty)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/DeleteSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetLoginProfile(ctx context.Context, in *GetLoginProfileRequest, opts ...grpc.CallOption) (*LoginProfile, error) {
out := new(LoginProfile)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/GetLoginProfile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) GetSshPublicKey(ctx context.Context, in *GetSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/GetSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) ImportSshPublicKey(ctx context.Context, in *ImportSshPublicKeyRequest, opts ...grpc.CallOption) (*ImportSshPublicKeyResponse, error) {
out := new(ImportSshPublicKeyResponse)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/ImportSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *osLoginServiceClient) UpdateSshPublicKey(ctx context.Context, in *UpdateSshPublicKeyRequest, opts ...grpc.CallOption) (*common.SshPublicKey, error) {
out := new(common.SshPublicKey)
err := c.cc.Invoke(ctx, "/google.cloud.oslogin.v1beta.OsLoginService/UpdateSshPublicKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// OsLoginServiceServer is the server API for OsLoginService service.
type OsLoginServiceServer interface {
// Deletes a POSIX account.
DeletePosixAccount(context.Context, *DeletePosixAccountRequest) (*empty.Empty, error)
// Deletes an SSH public key.
DeleteSshPublicKey(context.Context, *DeleteSshPublicKeyRequest) (*empty.Empty, error)
// Retrieves the profile information used for logging in to a virtual machine
// on Google Compute Engine.
GetLoginProfile(context.Context, *GetLoginProfileRequest) (*LoginProfile, error)
// Retrieves an SSH public key.
GetSshPublicKey(context.Context, *GetSshPublicKeyRequest) (*common.SshPublicKey, error)
// Adds an SSH public key and returns the profile information. Default POSIX
// account information is set when no username and UID exist as part of the
// login profile.
ImportSshPublicKey(context.Context, *ImportSshPublicKeyRequest) (*ImportSshPublicKeyResponse, error)
// Updates an SSH public key and returns the profile information. This method
// supports patch semantics.
UpdateSshPublicKey(context.Context, *UpdateSshPublicKeyRequest) (*common.SshPublicKey, error)
}
func RegisterOsLoginServiceServer(s *grpc.Server, srv OsLoginServiceServer) {
s.RegisterService(&_OsLoginService_serviceDesc, srv)
}
func _OsLoginService_DeletePosixAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePosixAccountRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/DeletePosixAccount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeletePosixAccount(ctx, req.(*DeletePosixAccountRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_DeleteSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/DeleteSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).DeleteSshPublicKey(ctx, req.(*DeleteSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetLoginProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetLoginProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/GetLoginProfile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetLoginProfile(ctx, req.(*GetLoginProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_GetSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/GetSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).GetSshPublicKey(ctx, req.(*GetSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_ImportSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ImportSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/ImportSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).ImportSshPublicKey(ctx, req.(*ImportSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _OsLoginService_UpdateSshPublicKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSshPublicKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.oslogin.v1beta.OsLoginService/UpdateSshPublicKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OsLoginServiceServer).UpdateSshPublicKey(ctx, req.(*UpdateSshPublicKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
var _OsLoginService_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.oslogin.v1beta.OsLoginService",
HandlerType: (*OsLoginServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "DeletePosixAccount",
Handler: _OsLoginService_DeletePosixAccount_Handler,
},
{
MethodName: "DeleteSshPublicKey",
Handler: _OsLoginService_DeleteSshPublicKey_Handler,
},
{
MethodName: "GetLoginProfile",
Handler: _OsLoginService_GetLoginProfile_Handler,
},
{
MethodName: "GetSshPublicKey",
Handler: _OsLoginService_GetSshPublicKey_Handler,
},
{
MethodName: "ImportSshPublicKey",
Handler: _OsLoginService_ImportSshPublicKey_Handler,
},
{
MethodName: "UpdateSshPublicKey",
Handler: _OsLoginService_UpdateSshPublicKey_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/oslogin/v1beta/oslogin.proto",
}
func init() {
proto.RegisterFile("google/cloud/oslogin/v1beta/oslogin.proto", fileDescriptor_c51261020b887e3b)
}
var fileDescriptor_c51261020b887e3b = []byte{
// 780 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 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a2, 0x82, 0x7a, 0xb8, 0x5a, 0xc3, 0x3e, 0x3a, 0x8f,
0xad, 0x47, 0xdc, 0x7a, 0x24, 0xac, 0x47, 0x87, 0x3c, 0x47, 0x6b, 0x9c, 0x97, 0x5a, 0xfb, 0x1b,
0x00, 0x00, 0xff, 0xff, 0xc7, 0x96, 0xd9, 0xc2, 0x8d, 0x09, 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

View file

@ -0,0 +1,685 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/runtimeconfig/v1beta1/resources.proto
package runtimeconfig
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// 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 fileDescriptor_7913f3704a8d250c, []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,proto3" json:"name,omitempty"`
// An optional description of the RuntimeConfig object.
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RuntimeConfig) Reset() { *m = RuntimeConfig{} }
func (m *RuntimeConfig) String() string { return proto.CompactTextString(m) }
func (*RuntimeConfig) ProtoMessage() {}
func (*RuntimeConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_7913f3704a8d250c, []int{0}
}
func (m *RuntimeConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RuntimeConfig.Unmarshal(m, b)
}
func (m *RuntimeConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RuntimeConfig.Marshal(b, m, deterministic)
}
func (m *RuntimeConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RuntimeConfig.Merge(m, src)
}
func (m *RuntimeConfig) XXX_Size() int {
return xxx_messageInfo_RuntimeConfig.Size(m)
}
func (m *RuntimeConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RuntimeConfig.DiscardUnknown(m)
}
var xxx_messageInfo_RuntimeConfig proto.InternalMessageInfo
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,proto3" json:"name,omitempty"`
// 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 *timestamp.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" 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,proto3,enum=google.cloud.runtimeconfig.v1beta1.VariableState" json:"state,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Variable) Reset() { *m = Variable{} }
func (m *Variable) String() string { return proto.CompactTextString(m) }
func (*Variable) ProtoMessage() {}
func (*Variable) Descriptor() ([]byte, []int) {
return fileDescriptor_7913f3704a8d250c, []int{1}
}
func (m *Variable) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Variable.Unmarshal(m, b)
}
func (m *Variable) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Variable.Marshal(b, m, deterministic)
}
func (m *Variable) XXX_Merge(src proto.Message) {
xxx_messageInfo_Variable.Merge(m, src)
}
func (m *Variable) XXX_Size() int {
return xxx_messageInfo_Variable.Size(m)
}
func (m *Variable) XXX_DiscardUnknown() {
xxx_messageInfo_Variable.DiscardUnknown(m)
}
var xxx_messageInfo_Variable proto.InternalMessageInfo
func (m *Variable) GetName() string {
if m != nil {
return m.Name
}
return ""
}
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,proto3,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) 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() *timestamp.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 += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Value)))
n += len(x.Value)
case *Variable_Text:
n += 1 // tag and wire
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"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *EndCondition) Reset() { *m = EndCondition{} }
func (m *EndCondition) String() string { return proto.CompactTextString(m) }
func (*EndCondition) ProtoMessage() {}
func (*EndCondition) Descriptor() ([]byte, []int) {
return fileDescriptor_7913f3704a8d250c, []int{2}
}
func (m *EndCondition) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EndCondition.Unmarshal(m, b)
}
func (m *EndCondition) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EndCondition.Marshal(b, m, deterministic)
}
func (m *EndCondition) XXX_Merge(src proto.Message) {
xxx_messageInfo_EndCondition.Merge(m, src)
}
func (m *EndCondition) XXX_Size() int {
return xxx_messageInfo_EndCondition.Size(m)
}
func (m *EndCondition) XXX_DiscardUnknown() {
xxx_messageInfo_EndCondition.DiscardUnknown(m)
}
var xxx_messageInfo_EndCondition proto.InternalMessageInfo
type isEndCondition_Condition interface {
isEndCondition_Condition()
}
type EndCondition_Cardinality_ struct {
Cardinality *EndCondition_Cardinality `protobuf:"bytes,1,opt,name=cardinality,proto3,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 += 1 // tag and wire
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,proto3" 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,proto3" json:"number,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_7913f3704a8d250c, []int{2, 0}
}
func (m *EndCondition_Cardinality) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EndCondition_Cardinality.Unmarshal(m, b)
}
func (m *EndCondition_Cardinality) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EndCondition_Cardinality.Marshal(b, m, deterministic)
}
func (m *EndCondition_Cardinality) XXX_Merge(src proto.Message) {
xxx_messageInfo_EndCondition_Cardinality.Merge(m, src)
}
func (m *EndCondition_Cardinality) XXX_Size() int {
return xxx_messageInfo_EndCondition_Cardinality.Size(m)
}
func (m *EndCondition_Cardinality) XXX_DiscardUnknown() {
xxx_messageInfo_EndCondition_Cardinality.DiscardUnknown(m)
}
var xxx_messageInfo_EndCondition_Cardinality proto.InternalMessageInfo
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,proto3" 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 *duration.Duration `protobuf:"bytes,2,opt,name=timeout,proto3" 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,proto3" 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,proto3" 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 *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" 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,proto3" json:"done,omitempty"`
// [Output Only] If the waiter ended due to a failure or timeout, this value
// will be set.
Error *status.Status `protobuf:"bytes,7,opt,name=error,proto3" json:"error,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Waiter) Reset() { *m = Waiter{} }
func (m *Waiter) String() string { return proto.CompactTextString(m) }
func (*Waiter) ProtoMessage() {}
func (*Waiter) Descriptor() ([]byte, []int) {
return fileDescriptor_7913f3704a8d250c, []int{3}
}
func (m *Waiter) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Waiter.Unmarshal(m, b)
}
func (m *Waiter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Waiter.Marshal(b, m, deterministic)
}
func (m *Waiter) XXX_Merge(src proto.Message) {
xxx_messageInfo_Waiter.Merge(m, src)
}
func (m *Waiter) XXX_Size() int {
return xxx_messageInfo_Waiter.Size(m)
}
func (m *Waiter) XXX_DiscardUnknown() {
xxx_messageInfo_Waiter.DiscardUnknown(m)
}
var xxx_messageInfo_Waiter proto.InternalMessageInfo
func (m *Waiter) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Waiter) GetTimeout() *duration.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() *timestamp.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() *status.Status {
if m != nil {
return m.Error
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.runtimeconfig.v1beta1.VariableState", VariableState_name, VariableState_value)
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")
}
func init() {
proto.RegisterFile("google/cloud/runtimeconfig/v1beta1/resources.proto", fileDescriptor_7913f3704a8d250c)
}
var fileDescriptor_7913f3704a8d250c = []byte{
// 628 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xdd, 0x6e, 0xd3, 0x30,
0x14, 0xc7, 0x9b, 0xd2, 0x8f, 0xed, 0x64, 0x43, 0x93, 0x85, 0x46, 0xa8, 0xd0, 0xa8, 0x7a, 0x81,
0x2a, 0x2e, 0x12, 0xda, 0x5d, 0xa1, 0x71,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x43, 0x15, 0xf2, 0xb5, 0x14, 0x5d, 0x68, 0xd1, 0xc5, 0x86, 0xe8, 0x62, 0x5e,
0x70, 0x17, 0x0d, 0x5d, 0xc5, 0xe1, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0xc9, 0x60, 0x90,
0x35, 0x05, 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

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,789 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta2/queue.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// State of the queue.
type Queue_State int32
const (
// Unspecified state.
Queue_STATE_UNSPECIFIED Queue_State = 0
// The queue is running. Tasks can be dispatched.
//
// If the queue was created using Cloud Tasks and the queue has
// had no activity (method calls or task dispatches) for 30 days,
// the queue may take a few minutes to re-activate. Some method
// calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
// tasks may not be dispatched for a few minutes until the queue
// has been re-activated.
Queue_RUNNING Queue_State = 1
// Tasks are paused by the user. If the queue is paused then Cloud
// Tasks will stop delivering tasks from it, but more tasks can
// still be added to it by the user. When a pull queue is paused,
// all [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls will return a
// [FAILED_PRECONDITION][google.rpc.Code.FAILED_PRECONDITION].
Queue_PAUSED Queue_State = 2
// The queue is disabled.
//
// A queue becomes `DISABLED` when
// [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) or
// [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) is uploaded
// which does not contain the queue. You cannot directly disable a queue.
//
// When a queue is disabled, tasks can still be added to a queue
// but the tasks are not dispatched and
// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] calls return a
// `FAILED_PRECONDITION` error.
//
// To permanently delete this queue and all of its tasks, call
// [DeleteQueue][google.cloud.tasks.v2beta2.CloudTasks.DeleteQueue].
Queue_DISABLED Queue_State = 3
)
var Queue_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "PAUSED",
3: "DISABLED",
}
var Queue_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"PAUSED": 2,
"DISABLED": 3,
}
func (x Queue_State) String() string {
return proto.EnumName(Queue_State_name, int32(x))
}
func (Queue_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b86070a8ff200176, []int{0, 0}
}
// A queue is a container of related tasks. Queues are configured to manage
// how those tasks are dispatched. Configurable properties include rate limits,
// retry options, target types, and others.
type Queue struct {
// Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue],
// after which it becomes output only.
//
// The queue name.
//
// The queue name must have the following format:
// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
//
// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), colons (:), or periods (.).
// For more information, see
// [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
// * `LOCATION_ID` is the canonical ID for the queue's location.
// The list of available locations can be obtained by calling
// [ListLocations][google.cloud.location.Locations.ListLocations].
// For more information, see https://cloud.google.com/about/locations/.
// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
// hyphens (-). The maximum length is 100 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta2.CloudTasks.CreateQueue][],
// after which the queue config type becomes output only, though fields within
// the config are mutable.
//
// The queue's target.
//
// The target applies to all tasks in the queue.
//
// Types that are valid to be assigned to TargetType:
// *Queue_AppEngineHttpTarget
// *Queue_PullTarget
TargetType isQueue_TargetType `protobuf_oneof:"target_type"`
// Rate limits for task dispatches.
//
// [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] and
// [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] are related because they both
// control task attempts however they control how tasks are
// attempted in different ways:
//
// * [rate_limits][google.cloud.tasks.v2beta2.Queue.rate_limits] controls the total rate of
// dispatches from a queue (i.e. all traffic dispatched from the
// queue, regardless of whether the dispatch is from a first
// attempt or a retry).
// * [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls what happens to
// particular a task after its first attempt fails. That is,
// [retry_config][google.cloud.tasks.v2beta2.Queue.retry_config] controls task retries (the
// second attempt, third attempt, etc).
RateLimits *RateLimits `protobuf:"bytes,5,opt,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
// Settings that determine the retry behavior.
//
// * For tasks created using Cloud Tasks: the queue-level retry settings
// apply to all tasks in the queue that were created using Cloud Tasks.
// Retry settings cannot be set on individual tasks.
// * For tasks created using the App Engine SDK: the queue-level retry
// settings apply to all tasks in the queue which do not have retry settings
// explicitly set on the task and were created by the App Engine SDK. See
// [App Engine documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
RetryConfig *RetryConfig `protobuf:"bytes,6,opt,name=retry_config,json=retryConfig,proto3" json:"retry_config,omitempty"`
// Output only. The state of the queue.
//
// `state` can only be changed by called
// [PauseQueue][google.cloud.tasks.v2beta2.CloudTasks.PauseQueue],
// [ResumeQueue][google.cloud.tasks.v2beta2.CloudTasks.ResumeQueue], or uploading
// [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
// [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] cannot be used to change `state`.
State Queue_State `protobuf:"varint,7,opt,name=state,proto3,enum=google.cloud.tasks.v2beta2.Queue_State" json:"state,omitempty"`
// Output only. The last time this queue was purged.
//
// All tasks that were [created][google.cloud.tasks.v2beta2.Task.create_time] before this time
// were purged.
//
// A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta2.CloudTasks.PurgeQueue], the
// [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
//
// Purge time will be truncated to the nearest microsecond. Purge
// time will be unset if the queue has never been purged.
PurgeTime *timestamp.Timestamp `protobuf:"bytes,8,opt,name=purge_time,json=purgeTime,proto3" json:"purge_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Queue) Reset() { *m = Queue{} }
func (m *Queue) String() string { return proto.CompactTextString(m) }
func (*Queue) ProtoMessage() {}
func (*Queue) Descriptor() ([]byte, []int) {
return fileDescriptor_b86070a8ff200176, []int{0}
}
func (m *Queue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Queue.Unmarshal(m, b)
}
func (m *Queue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Queue.Marshal(b, m, deterministic)
}
func (m *Queue) XXX_Merge(src proto.Message) {
xxx_messageInfo_Queue.Merge(m, src)
}
func (m *Queue) XXX_Size() int {
return xxx_messageInfo_Queue.Size(m)
}
func (m *Queue) XXX_DiscardUnknown() {
xxx_messageInfo_Queue.DiscardUnknown(m)
}
var xxx_messageInfo_Queue proto.InternalMessageInfo
func (m *Queue) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type isQueue_TargetType interface {
isQueue_TargetType()
}
type Queue_AppEngineHttpTarget struct {
AppEngineHttpTarget *AppEngineHttpTarget `protobuf:"bytes,3,opt,name=app_engine_http_target,json=appEngineHttpTarget,proto3,oneof"`
}
type Queue_PullTarget struct {
PullTarget *PullTarget `protobuf:"bytes,4,opt,name=pull_target,json=pullTarget,proto3,oneof"`
}
func (*Queue_AppEngineHttpTarget) isQueue_TargetType() {}
func (*Queue_PullTarget) isQueue_TargetType() {}
func (m *Queue) GetTargetType() isQueue_TargetType {
if m != nil {
return m.TargetType
}
return nil
}
func (m *Queue) GetAppEngineHttpTarget() *AppEngineHttpTarget {
if x, ok := m.GetTargetType().(*Queue_AppEngineHttpTarget); ok {
return x.AppEngineHttpTarget
}
return nil
}
func (m *Queue) GetPullTarget() *PullTarget {
if x, ok := m.GetTargetType().(*Queue_PullTarget); ok {
return x.PullTarget
}
return nil
}
func (m *Queue) GetRateLimits() *RateLimits {
if m != nil {
return m.RateLimits
}
return nil
}
func (m *Queue) GetRetryConfig() *RetryConfig {
if m != nil {
return m.RetryConfig
}
return nil
}
func (m *Queue) GetState() Queue_State {
if m != nil {
return m.State
}
return Queue_STATE_UNSPECIFIED
}
func (m *Queue) GetPurgeTime() *timestamp.Timestamp {
if m != nil {
return m.PurgeTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Queue) 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 _Queue_OneofMarshaler, _Queue_OneofUnmarshaler, _Queue_OneofSizer, []interface{}{
(*Queue_AppEngineHttpTarget)(nil),
(*Queue_PullTarget)(nil),
}
}
func _Queue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Queue)
// target_type
switch x := m.TargetType.(type) {
case *Queue_AppEngineHttpTarget:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.AppEngineHttpTarget); err != nil {
return err
}
case *Queue_PullTarget:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.PullTarget); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Queue.TargetType has unexpected type %T", x)
}
return nil
}
func _Queue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Queue)
switch tag {
case 3: // target_type.app_engine_http_target
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(AppEngineHttpTarget)
err := b.DecodeMessage(msg)
m.TargetType = &Queue_AppEngineHttpTarget{msg}
return true, err
case 4: // target_type.pull_target
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PullTarget)
err := b.DecodeMessage(msg)
m.TargetType = &Queue_PullTarget{msg}
return true, err
default:
return false, nil
}
}
func _Queue_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Queue)
// target_type
switch x := m.TargetType.(type) {
case *Queue_AppEngineHttpTarget:
s := proto.Size(x.AppEngineHttpTarget)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Queue_PullTarget:
s := proto.Size(x.PullTarget)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Rate limits.
//
// This message determines the maximum rate that tasks can be dispatched by a
// queue, regardless of whether the dispatch is a first task attempt or a retry.
//
// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta2.CloudTasks.RunTask], will run a task
// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta2.RateLimits].
type RateLimits struct {
// The maximum rate at which tasks are dispatched from this queue.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// * For [App Engine queues][google.cloud.tasks.v2beta2.AppEngineHttpTarget], the maximum allowed value
// is 500.
// * This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget]. In addition to the
// `max_tasks_dispatched_per_second` limit, a maximum of 10 QPS of
// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] requests are allowed per pull queue.
//
//
// This field has the same meaning as
// [rate in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
MaxTasksDispatchedPerSecond float64 `protobuf:"fixed64,1,opt,name=max_tasks_dispatched_per_second,json=maxTasksDispatchedPerSecond,proto3" json:"max_tasks_dispatched_per_second,omitempty"`
// Output only. The max burst size.
//
// Max burst size limits how fast tasks in queue are processed when
// many tasks are in the queue and the rate is high. This field
// allows the queue to have a high rate so processing starts shortly
// after a task is enqueued, but still limits resource usage when
// many tasks are enqueued in a short period of time.
//
// The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
// algorithm is used to control the rate of task dispatches. Each
// queue has a token bucket that holds tokens, up to the maximum
// specified by `max_burst_size`. Each time a task is dispatched, a
// token is removed from the bucket. Tasks will be dispatched until
// the queue's bucket runs out of tokens. The bucket will be
// continuously refilled with new tokens based on
// [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
//
// Cloud Tasks will pick the value of `max_burst_size` based on the
// value of
// [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second].
//
// For App Engine queues that were created or updated using
// `queue.yaml/xml`, `max_burst_size` is equal to
// [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
// Since `max_burst_size` is output only, if
// [UpdateQueue][google.cloud.tasks.v2beta2.CloudTasks.UpdateQueue] is called on a queue
// created by `queue.yaml/xml`, `max_burst_size` will be reset based
// on the value of
// [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second],
// regardless of whether
// [max_tasks_dispatched_per_second][google.cloud.tasks.v2beta2.RateLimits.max_tasks_dispatched_per_second]
// is updated.
//
MaxBurstSize int32 `protobuf:"varint,2,opt,name=max_burst_size,json=maxBurstSize,proto3" json:"max_burst_size,omitempty"`
// The maximum number of concurrent tasks that Cloud Tasks allows
// to be dispatched for this queue. After this threshold has been
// reached, Cloud Tasks stops dispatching tasks until the number of
// concurrent requests decreases.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// The maximum allowed value is 5,000.
//
// This field is output only for
// [pull queues][google.cloud.tasks.v2beta2.PullTarget] and always -1, which indicates no limit. No other
// queue types can have `max_concurrent_tasks` set to -1.
//
//
// This field has the same meaning as
// [max_concurrent_requests in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
MaxConcurrentTasks int32 `protobuf:"varint,3,opt,name=max_concurrent_tasks,json=maxConcurrentTasks,proto3" json:"max_concurrent_tasks,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RateLimits) Reset() { *m = RateLimits{} }
func (m *RateLimits) String() string { return proto.CompactTextString(m) }
func (*RateLimits) ProtoMessage() {}
func (*RateLimits) Descriptor() ([]byte, []int) {
return fileDescriptor_b86070a8ff200176, []int{1}
}
func (m *RateLimits) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RateLimits.Unmarshal(m, b)
}
func (m *RateLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RateLimits.Marshal(b, m, deterministic)
}
func (m *RateLimits) XXX_Merge(src proto.Message) {
xxx_messageInfo_RateLimits.Merge(m, src)
}
func (m *RateLimits) XXX_Size() int {
return xxx_messageInfo_RateLimits.Size(m)
}
func (m *RateLimits) XXX_DiscardUnknown() {
xxx_messageInfo_RateLimits.DiscardUnknown(m)
}
var xxx_messageInfo_RateLimits proto.InternalMessageInfo
func (m *RateLimits) GetMaxTasksDispatchedPerSecond() float64 {
if m != nil {
return m.MaxTasksDispatchedPerSecond
}
return 0
}
func (m *RateLimits) GetMaxBurstSize() int32 {
if m != nil {
return m.MaxBurstSize
}
return 0
}
func (m *RateLimits) GetMaxConcurrentTasks() int32 {
if m != nil {
return m.MaxConcurrentTasks
}
return 0
}
// Retry config.
//
// These settings determine how a failed task attempt is retried.
type RetryConfig struct {
// Number of attempts per task.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
//
// This field has the same meaning as
// [task_retry_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
//
// Types that are valid to be assigned to NumAttempts:
// *RetryConfig_MaxAttempts
// *RetryConfig_UnlimitedAttempts
NumAttempts isRetryConfig_NumAttempts `protobuf_oneof:"num_attempts"`
// If positive, `max_retry_duration` specifies the time limit for
// retrying a failed task, measured from when the task was first
// attempted. Once `max_retry_duration` time has passed *and* the
// task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
// times, no further attempts will be made and the task will be
// deleted.
//
// If zero, then the task age is unlimited.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget].
//
//
// `max_retry_duration` will be truncated to the nearest second.
//
// This field has the same meaning as
// [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxRetryDuration *duration.Duration `protobuf:"bytes,3,opt,name=max_retry_duration,json=maxRetryDuration,proto3" json:"max_retry_duration,omitempty"`
// A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between
// [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
// [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
// if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
// retried.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget].
//
//
// `min_backoff` will be truncated to the nearest second.
//
// This field has the same meaning as
// [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MinBackoff *duration.Duration `protobuf:"bytes,4,opt,name=min_backoff,json=minBackoff,proto3" json:"min_backoff,omitempty"`
// A task will be [scheduled][google.cloud.tasks.v2beta2.Task.schedule_time] for retry between
// [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] and
// [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] duration after it fails,
// if the queue's [RetryConfig][google.cloud.tasks.v2beta2.RetryConfig] specifies that the task should be
// retried.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget].
//
//
// `max_backoff` will be truncated to the nearest second.
//
// This field has the same meaning as
// [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxBackoff *duration.Duration `protobuf:"bytes,5,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"`
// The time between retries will double `max_doublings` times.
//
// A task's retry interval starts at
// [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff], then doubles
// `max_doublings` times, then increases linearly, and finally
// retries retries at intervals of
// [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] up to
// [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts] times.
//
// For example, if [min_backoff][google.cloud.tasks.v2beta2.RetryConfig.min_backoff] is 10s,
// [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] is 300s, and
// `max_doublings` is 3, then the a task will first be retried in
// 10s. The retry interval will double three times, and then
// increase linearly by 2^3 * 10s. Finally, the task will retry at
// intervals of [max_backoff][google.cloud.tasks.v2beta2.RetryConfig.max_backoff] until the
// task has been attempted [max_attempts][google.cloud.tasks.v2beta2.RetryConfig.max_attempts]
// times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
// 240s, 300s, 300s, ....
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// This field is output only for [pull queues][google.cloud.tasks.v2beta2.PullTarget].
//
//
// This field has the same meaning as
// [max_doublings in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxDoublings int32 `protobuf:"varint,6,opt,name=max_doublings,json=maxDoublings,proto3" json:"max_doublings,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetryConfig) Reset() { *m = RetryConfig{} }
func (m *RetryConfig) String() string { return proto.CompactTextString(m) }
func (*RetryConfig) ProtoMessage() {}
func (*RetryConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_b86070a8ff200176, []int{2}
}
func (m *RetryConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetryConfig.Unmarshal(m, b)
}
func (m *RetryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetryConfig.Marshal(b, m, deterministic)
}
func (m *RetryConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetryConfig.Merge(m, src)
}
func (m *RetryConfig) XXX_Size() int {
return xxx_messageInfo_RetryConfig.Size(m)
}
func (m *RetryConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RetryConfig.DiscardUnknown(m)
}
var xxx_messageInfo_RetryConfig proto.InternalMessageInfo
type isRetryConfig_NumAttempts interface {
isRetryConfig_NumAttempts()
}
type RetryConfig_MaxAttempts struct {
MaxAttempts int32 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,proto3,oneof"`
}
type RetryConfig_UnlimitedAttempts struct {
UnlimitedAttempts bool `protobuf:"varint,2,opt,name=unlimited_attempts,json=unlimitedAttempts,proto3,oneof"`
}
func (*RetryConfig_MaxAttempts) isRetryConfig_NumAttempts() {}
func (*RetryConfig_UnlimitedAttempts) isRetryConfig_NumAttempts() {}
func (m *RetryConfig) GetNumAttempts() isRetryConfig_NumAttempts {
if m != nil {
return m.NumAttempts
}
return nil
}
func (m *RetryConfig) GetMaxAttempts() int32 {
if x, ok := m.GetNumAttempts().(*RetryConfig_MaxAttempts); ok {
return x.MaxAttempts
}
return 0
}
func (m *RetryConfig) GetUnlimitedAttempts() bool {
if x, ok := m.GetNumAttempts().(*RetryConfig_UnlimitedAttempts); ok {
return x.UnlimitedAttempts
}
return false
}
func (m *RetryConfig) GetMaxRetryDuration() *duration.Duration {
if m != nil {
return m.MaxRetryDuration
}
return nil
}
func (m *RetryConfig) GetMinBackoff() *duration.Duration {
if m != nil {
return m.MinBackoff
}
return nil
}
func (m *RetryConfig) GetMaxBackoff() *duration.Duration {
if m != nil {
return m.MaxBackoff
}
return nil
}
func (m *RetryConfig) GetMaxDoublings() int32 {
if m != nil {
return m.MaxDoublings
}
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*RetryConfig) 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 _RetryConfig_OneofMarshaler, _RetryConfig_OneofUnmarshaler, _RetryConfig_OneofSizer, []interface{}{
(*RetryConfig_MaxAttempts)(nil),
(*RetryConfig_UnlimitedAttempts)(nil),
}
}
func _RetryConfig_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*RetryConfig)
// num_attempts
switch x := m.NumAttempts.(type) {
case *RetryConfig_MaxAttempts:
b.EncodeVarint(1<<3 | proto.WireVarint)
b.EncodeVarint(uint64(x.MaxAttempts))
case *RetryConfig_UnlimitedAttempts:
t := uint64(0)
if x.UnlimitedAttempts {
t = 1
}
b.EncodeVarint(2<<3 | proto.WireVarint)
b.EncodeVarint(t)
case nil:
default:
return fmt.Errorf("RetryConfig.NumAttempts has unexpected type %T", x)
}
return nil
}
func _RetryConfig_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*RetryConfig)
switch tag {
case 1: // num_attempts.max_attempts
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.NumAttempts = &RetryConfig_MaxAttempts{int32(x)}
return true, err
case 2: // num_attempts.unlimited_attempts
if wire != proto.WireVarint {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.NumAttempts = &RetryConfig_UnlimitedAttempts{x != 0}
return true, err
default:
return false, nil
}
}
func _RetryConfig_OneofSizer(msg proto.Message) (n int) {
m := msg.(*RetryConfig)
// num_attempts
switch x := m.NumAttempts.(type) {
case *RetryConfig_MaxAttempts:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(x.MaxAttempts))
case *RetryConfig_UnlimitedAttempts:
n += 1 // tag and wire
n += 1
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta2.Queue_State", Queue_State_name, Queue_State_value)
proto.RegisterType((*Queue)(nil), "google.cloud.tasks.v2beta2.Queue")
proto.RegisterType((*RateLimits)(nil), "google.cloud.tasks.v2beta2.RateLimits")
proto.RegisterType((*RetryConfig)(nil), "google.cloud.tasks.v2beta2.RetryConfig")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta2/queue.proto", fileDescriptor_b86070a8ff200176)
}
var fileDescriptor_b86070a8ff200176 = []byte{
// 702 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcb, 0x6e, 0xdb, 0x3a,
0x10, 0x86, 0xad, 0x24, 0xca, 0x65, 0xe4, 0x04, 0x0e, 0xcf, 0x05, 0x3e, 0x3e, 0x45, 0x62, 0x38,
0x45, 0xe2, 0x95, 0x54, 0xa4, 0xab, 0xb6, 0x28, 0x0a, 0x3b, 0x72, 0x63, 0x17, 0x81, 0xe1, 0xca,
0xce, 0xa6, 0x1b, 0x82, 0x96, 0x69, 0x45, 0x88, 0x44, 0xb2, 0x12, 0x55, 0x38, 0x79, 0xa4, 0x6e,
0xfb, 0x34, 0x7d, 0x9b, 0x82, 0xd4, 0x25, 0x45, 0xd3, 0x3a, 0x3b, 0x73, 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 0xdb, 0x77, 0xcb, 0x58, 0xff, 0x00, 0xea, 0x2c, 0x8b, 0xab,
0x0b, 0xe9, 0x73, 0x38, 0xf2, 0x79, 0xbc, 0x66, 0x9d, 0xfb, 0xa0, 0xf7, 0x79, 0xa2, 0x4a, 0x4f,
0x8c, 0x4f, 0xef, 0x0a, 0x32, 0xe0, 0x11, 0x61, 0x81, 0xcd, 0x93, 0xc0, 0x09, 0x28, 0xd3, 0x8d,
0x39, 0x79, 0x8a, 0x88, 0x30, 0xfd, 0xdd, 0xff, 0xde, 0x1b, 0x7d, 0x9a, 0x6f, 0x6b, 0xf6, 0xe5,
0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xd6, 0xd1, 0xaa, 0xde, 0x84, 0x05, 0x00, 0x00,
}

View file

@ -0,0 +1,635 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta2/target.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/duration"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// The HTTP method used to execute the task.
type HttpMethod int32
const (
// HTTP method unspecified
HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0
// HTTP POST
HttpMethod_POST HttpMethod = 1
// HTTP GET
HttpMethod_GET HttpMethod = 2
// HTTP HEAD
HttpMethod_HEAD HttpMethod = 3
// HTTP PUT
HttpMethod_PUT HttpMethod = 4
// HTTP DELETE
HttpMethod_DELETE HttpMethod = 5
)
var HttpMethod_name = map[int32]string{
0: "HTTP_METHOD_UNSPECIFIED",
1: "POST",
2: "GET",
3: "HEAD",
4: "PUT",
5: "DELETE",
}
var HttpMethod_value = map[string]int32{
"HTTP_METHOD_UNSPECIFIED": 0,
"POST": 1,
"GET": 2,
"HEAD": 3,
"PUT": 4,
"DELETE": 5,
}
func (x HttpMethod) String() string {
return proto.EnumName(HttpMethod_name, int32(x))
}
func (HttpMethod) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{0}
}
// Pull target.
type PullTarget struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PullTarget) Reset() { *m = PullTarget{} }
func (m *PullTarget) String() string { return proto.CompactTextString(m) }
func (*PullTarget) ProtoMessage() {}
func (*PullTarget) Descriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{0}
}
func (m *PullTarget) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullTarget.Unmarshal(m, b)
}
func (m *PullTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PullTarget.Marshal(b, m, deterministic)
}
func (m *PullTarget) XXX_Merge(src proto.Message) {
xxx_messageInfo_PullTarget.Merge(m, src)
}
func (m *PullTarget) XXX_Size() int {
return xxx_messageInfo_PullTarget.Size(m)
}
func (m *PullTarget) XXX_DiscardUnknown() {
xxx_messageInfo_PullTarget.DiscardUnknown(m)
}
var xxx_messageInfo_PullTarget proto.InternalMessageInfo
// The pull message contains data that can be used by the caller of
// [LeaseTasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] to process the task.
//
// This proto can only be used for tasks in a queue which has
// [pull_target][google.cloud.tasks.v2beta2.Queue.pull_target] set.
type PullMessage struct {
// A data payload consumed by the worker to execute the task.
Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
// The task's tag.
//
// Tags allow similar tasks to be processed in a batch. If you label
// tasks with a tag, your worker can
// [lease tasks][google.cloud.tasks.v2beta2.CloudTasks.LeaseTasks] with the same tag using
// [filter][google.cloud.tasks.v2beta2.LeaseTasksRequest.filter]. For example, if you want to
// aggregate the events associated with a specific user once a day,
// you could tag tasks with the user ID.
//
// The task's tag can only be set when the
// [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
//
// The tag must be less than 500 characters.
//
// SDK compatibility: Although the SDK allows tags to be either
// string or [bytes](https://cloud.google.com/appengine/docs/standard/java/javadoc/com/google/appengine/api/taskqueue/TaskOptions.html#tag-byte:A-),
// only UTF-8 encoded tags can be used in Cloud Tasks. If a tag isn't UTF-8
// encoded, the tag will be empty when the task is returned by Cloud Tasks.
Tag string `protobuf:"bytes,2,opt,name=tag,proto3" json:"tag,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PullMessage) Reset() { *m = PullMessage{} }
func (m *PullMessage) String() string { return proto.CompactTextString(m) }
func (*PullMessage) ProtoMessage() {}
func (*PullMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{1}
}
func (m *PullMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PullMessage.Unmarshal(m, b)
}
func (m *PullMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PullMessage.Marshal(b, m, deterministic)
}
func (m *PullMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_PullMessage.Merge(m, src)
}
func (m *PullMessage) XXX_Size() int {
return xxx_messageInfo_PullMessage.Size(m)
}
func (m *PullMessage) XXX_DiscardUnknown() {
xxx_messageInfo_PullMessage.DiscardUnknown(m)
}
var xxx_messageInfo_PullMessage proto.InternalMessageInfo
func (m *PullMessage) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *PullMessage) GetTag() string {
if m != nil {
return m.Tag
}
return ""
}
// App Engine HTTP target.
//
// The task will be delivered to the App Engine application hostname
// specified by its [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] and [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest].
// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] explains how the
// task's host URL is constructed.
//
// Using [AppEngineHttpTarget][google.cloud.tasks.v2beta2.AppEngineHttpTarget] requires
// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
// Google IAM permission for the project
// and the following scope:
//
// `https://www.googleapis.com/auth/cloud-platform`
type AppEngineHttpTarget struct {
// Overrides for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
//
// If set, `app_engine_routing_override` is used for all tasks in
// the queue, no matter what the setting is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
AppEngineRoutingOverride *AppEngineRouting `protobuf:"bytes,1,opt,name=app_engine_routing_override,json=appEngineRoutingOverride,proto3" json:"app_engine_routing_override,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineHttpTarget) Reset() { *m = AppEngineHttpTarget{} }
func (m *AppEngineHttpTarget) String() string { return proto.CompactTextString(m) }
func (*AppEngineHttpTarget) ProtoMessage() {}
func (*AppEngineHttpTarget) Descriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{2}
}
func (m *AppEngineHttpTarget) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineHttpTarget.Unmarshal(m, b)
}
func (m *AppEngineHttpTarget) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineHttpTarget.Marshal(b, m, deterministic)
}
func (m *AppEngineHttpTarget) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineHttpTarget.Merge(m, src)
}
func (m *AppEngineHttpTarget) XXX_Size() int {
return xxx_messageInfo_AppEngineHttpTarget.Size(m)
}
func (m *AppEngineHttpTarget) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineHttpTarget.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineHttpTarget proto.InternalMessageInfo
func (m *AppEngineHttpTarget) GetAppEngineRoutingOverride() *AppEngineRouting {
if m != nil {
return m.AppEngineRoutingOverride
}
return nil
}
// App Engine HTTP request.
//
// The message defines the HTTP request that is sent to an App Engine app when
// the task is dispatched.
//
// This proto can only be used for tasks in a queue which has
// [app_engine_http_target][google.cloud.tasks.v2beta2.Queue.app_engine_http_target] set.
//
// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] requires
// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
// Google IAM permission for the project
// and the following scope:
//
// `https://www.googleapis.com/auth/cloud-platform`
//
// The task will be delivered to the App Engine app which belongs to the same
// project as the queue. For more information, see
// [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
// and how routing is affected by
// [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
//
// The [AppEngineRouting][google.cloud.tasks.v2beta2.AppEngineRouting] used to construct the URL that the task is
// delivered to can be set at the queue-level or task-level:
//
// * If set,
// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
// is used for all tasks in the queue, no matter what the setting
// is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
//
//
// The `url` that the task will be sent to is:
//
// * `url =` [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] `+`
// [relative_url][google.cloud.tasks.v2beta2.AppEngineHttpRequest.relative_url]
//
// The task attempt has succeeded if the app's request handler returns
// an HTTP response code in the range [`200` - `299`]. `503` is
// considered an App Engine system error instead of an application
// error. Requests returning error `503` will be retried regardless of
// retry configuration and not counted against retry counts.
// Any other response code or a failure to receive a response before the
// deadline is a failed attempt.
type AppEngineHttpRequest struct {
// The HTTP method to use for the request. The default is POST.
//
// The app's request handler for the task's target URL must be able to handle
// HTTP requests with this http_method, otherwise the task attempt will fail
// with error code 405 (Method Not Allowed). See
// [Writing a push task request handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
// and the documentation for the request handlers in the language your app is
// written in e.g.
// [Python Request Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
HttpMethod HttpMethod `protobuf:"varint,1,opt,name=http_method,json=httpMethod,proto3,enum=google.cloud.tasks.v2beta2.HttpMethod" json:"http_method,omitempty"`
// Task-level setting for App Engine routing.
//
// If set,
// [app_engine_routing_override][google.cloud.tasks.v2beta2.AppEngineHttpTarget.app_engine_routing_override]
// is used for all tasks in the queue, no matter what the setting is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta2.AppEngineHttpRequest.app_engine_routing].
AppEngineRouting *AppEngineRouting `protobuf:"bytes,2,opt,name=app_engine_routing,json=appEngineRouting,proto3" json:"app_engine_routing,omitempty"`
// The relative URL.
//
// The relative URL must begin with "/" and must be a valid HTTP relative URL.
// It can contain a path and query string arguments.
// If the relative URL is empty, then the root path "/" will be used.
// No spaces are allowed, and the maximum length allowed is 2083 characters.
RelativeUrl string `protobuf:"bytes,3,opt,name=relative_url,json=relativeUrl,proto3" json:"relative_url,omitempty"`
// HTTP request headers.
//
// This map contains the header field names and values.
// Headers can be set when the
// [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
// Repeated headers are not supported but a header value can contain commas.
//
// Cloud Tasks sets some headers to default values:
//
// * `User-Agent`: By default, this header is
// `"AppEngine-Google; (+http://code.google.com/appengine)"`.
// This header can be modified, but Cloud Tasks will append
// `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
// modified `User-Agent`.
//
// If the task has a [payload][google.cloud.tasks.v2beta2.AppEngineHttpRequest.payload], Cloud
// Tasks sets the following headers:
//
// * `Content-Type`: By default, the `Content-Type` header is set to
// `"application/octet-stream"`. The default can be overridden by explicitly
// setting `Content-Type` to a particular media type when the
// [task is created][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
// For example, `Content-Type` can be set to `"application/json"`.
// * `Content-Length`: This is computed by Cloud Tasks. This value is
// output only. It cannot be changed.
//
// The headers below cannot be set or overridden:
//
// * `Host`
// * `X-Google-*`
// * `X-AppEngine-*`
//
// In addition, Cloud Tasks sets some headers when the task is dispatched,
// such as headers containing information about the task; see
// [request headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
// These headers are set only when the task is dispatched, so they are not
// visible when the task is returned in a Cloud Tasks response.
//
// Although there is no specific limit for the maximum number of headers or
// the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta2.Task]. For more
// information, see the [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask] documentation.
Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// Payload.
//
// The payload will be sent as the HTTP message body. A message
// body, and thus a payload, is allowed only if the HTTP method is
// POST or PUT. It is an error to set a data payload on a task with
// an incompatible [HttpMethod][google.cloud.tasks.v2beta2.HttpMethod].
Payload []byte `protobuf:"bytes,5,opt,name=payload,proto3" json:"payload,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineHttpRequest) Reset() { *m = AppEngineHttpRequest{} }
func (m *AppEngineHttpRequest) String() string { return proto.CompactTextString(m) }
func (*AppEngineHttpRequest) ProtoMessage() {}
func (*AppEngineHttpRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{3}
}
func (m *AppEngineHttpRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineHttpRequest.Unmarshal(m, b)
}
func (m *AppEngineHttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineHttpRequest.Marshal(b, m, deterministic)
}
func (m *AppEngineHttpRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineHttpRequest.Merge(m, src)
}
func (m *AppEngineHttpRequest) XXX_Size() int {
return xxx_messageInfo_AppEngineHttpRequest.Size(m)
}
func (m *AppEngineHttpRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineHttpRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineHttpRequest proto.InternalMessageInfo
func (m *AppEngineHttpRequest) GetHttpMethod() HttpMethod {
if m != nil {
return m.HttpMethod
}
return HttpMethod_HTTP_METHOD_UNSPECIFIED
}
func (m *AppEngineHttpRequest) GetAppEngineRouting() *AppEngineRouting {
if m != nil {
return m.AppEngineRouting
}
return nil
}
func (m *AppEngineHttpRequest) GetRelativeUrl() string {
if m != nil {
return m.RelativeUrl
}
return ""
}
func (m *AppEngineHttpRequest) GetHeaders() map[string]string {
if m != nil {
return m.Headers
}
return nil
}
func (m *AppEngineHttpRequest) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
// App Engine Routing.
//
// For more information about services, versions, and instances see
// [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
// [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
// [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
// and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
type AppEngineRouting struct {
// App service.
//
// By default, the task is sent to the service which is the default
// service when the task is attempted.
//
// For some queues or tasks which were created using the App Engine
// Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
// into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
// which were created using the App Engine SDK use a custom domain
// name; custom domains are not parsed by Cloud Tasks. If
// [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
// [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// App version.
//
// By default, the task is sent to the version which is the default
// version when the task is attempted.
//
// For some queues or tasks which were created using the App Engine
// Task Queue API, [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable
// into [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]. For example, some tasks
// which were created using the App Engine SDK use a custom domain
// name; custom domains are not parsed by Cloud Tasks. If
// [host][google.cloud.tasks.v2beta2.AppEngineRouting.host] is not parsable, then
// [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] are the empty string.
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// App instance.
//
// By default, the task is sent to an instance which is available when
// the task is attempted.
//
// Requests can only be sent to a specific instance if
// [manual scaling is used in App Engine Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
// App Engine Flex does not support instances. For more information, see
// [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
// and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Instance string `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
// Output only. The host that the task is sent to.
//
// For more information, see
// [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
//
// The host is constructed as:
//
//
// * `host = [application_domain_name]`</br>
// `| [service] + '.' + [application_domain_name]`</br>
// `| [version] + '.' + [application_domain_name]`</br>
// `| [version_dot_service]+ '.' + [application_domain_name]`</br>
// `| [instance] + '.' + [application_domain_name]`</br>
// `| [instance_dot_service] + '.' + [application_domain_name]`</br>
// `| [instance_dot_version] + '.' + [application_domain_name]`</br>
// `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
//
// * `application_domain_name` = The domain name of the app, for
// example <app-id>.appspot.com, which is associated with the
// queue's project ID. Some tasks which were created using the App Engine
// SDK use a custom domain name.
//
// * `service =` [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
//
// * `version =` [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
//
// * `version_dot_service =`
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
// [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
//
// * `instance =` [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance]
//
// * `instance_dot_service =`
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
// [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
//
// * `instance_dot_version =`
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version]
//
// * `instance_dot_version_dot_service =`
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] `+ '.' +`
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] `+ '.' +`
// [service][google.cloud.tasks.v2beta2.AppEngineRouting.service]
//
// If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service] is empty, then the task will be sent
// to the service which is the default service when the task is attempted.
//
// If [version][google.cloud.tasks.v2beta2.AppEngineRouting.version] is empty, then the task will be sent
// to the version which is the default version when the task is attempted.
//
// If [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is empty, then the task
// will be sent to an instance which is available when the task is
// attempted.
//
// If [service][google.cloud.tasks.v2beta2.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta2.AppEngineRouting.version], or
// [instance][google.cloud.tasks.v2beta2.AppEngineRouting.instance] is invalid, then the task
// will be sent to the default version of the default service when
// the task is attempted.
Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineRouting) Reset() { *m = AppEngineRouting{} }
func (m *AppEngineRouting) String() string { return proto.CompactTextString(m) }
func (*AppEngineRouting) ProtoMessage() {}
func (*AppEngineRouting) Descriptor() ([]byte, []int) {
return fileDescriptor_ad20693261d55153, []int{4}
}
func (m *AppEngineRouting) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineRouting.Unmarshal(m, b)
}
func (m *AppEngineRouting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineRouting.Marshal(b, m, deterministic)
}
func (m *AppEngineRouting) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineRouting.Merge(m, src)
}
func (m *AppEngineRouting) XXX_Size() int {
return xxx_messageInfo_AppEngineRouting.Size(m)
}
func (m *AppEngineRouting) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineRouting.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineRouting proto.InternalMessageInfo
func (m *AppEngineRouting) GetService() string {
if m != nil {
return m.Service
}
return ""
}
func (m *AppEngineRouting) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *AppEngineRouting) GetInstance() string {
if m != nil {
return m.Instance
}
return ""
}
func (m *AppEngineRouting) GetHost() string {
if m != nil {
return m.Host
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta2.HttpMethod", HttpMethod_name, HttpMethod_value)
proto.RegisterType((*PullTarget)(nil), "google.cloud.tasks.v2beta2.PullTarget")
proto.RegisterType((*PullMessage)(nil), "google.cloud.tasks.v2beta2.PullMessage")
proto.RegisterType((*AppEngineHttpTarget)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpTarget")
proto.RegisterType((*AppEngineHttpRequest)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpRequest")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.tasks.v2beta2.AppEngineHttpRequest.HeadersEntry")
proto.RegisterType((*AppEngineRouting)(nil), "google.cloud.tasks.v2beta2.AppEngineRouting")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta2/target.proto", fileDescriptor_ad20693261d55153)
}
var fileDescriptor_ad20693261d55153 = []byte{
// 557 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x6f, 0xd3, 0x4c,
0x10, 0xfd, 0x5c, 0xa7, 0xbf, 0xc6, 0xd1, 0x27, 0x6b, 0xa9, 0x84, 0x95, 0xa2, 0xaa, 0xe4, 0x00,
0x15, 0x42, 0xb6, 0x14, 0x2e, 0x50, 0x84, 0x50, 0x4b, 0x4c, 0x53, 0x89, 0x12, 0xcb, 0x75, 0x84,
0x54, 0x0e, 0xd6, 0x26, 0x19, 0x1c, 0x2b, 0xee, 0xae, 0xd9, 0x5d, 0x5b, 0xca, 0x95, 0x3b, 0xff,
0x33, 0xf2, 0xda, 0x09, 0x69, 0x80, 0x0a, 0x6e, 0xf3, 0x66, 0xde, 0xbc, 0xc9, 0xbc, 0xf1, 0x06,
0x9e, 0x26, 0x9c, 0x27, 0x19, 0x7a, 0x93, 0x8c, 0x17, 0x53, 0x4f, 0x51, 0x39, 0x97, 0x5e, 0xd9,
0x1b, 0xa3, 0xa2, 0x3d, 0x4f, 0x51, 0x91, 0xa0, 0x72, 0x73, 0xc1, 0x15, 0x27, 0x9d, 0x9a, 0xe8,
0x6a, 0xa2, 0xab, 0x89, 0x6e, 0x43, 0xec, 0x3c, 0x6a, 0x44, 0x68, 0x9e, 0x7a, 0x94, 0x31, 0xae,
0xa8, 0x4a, 0x39, 0x93, 0x75, 0x67, 0xe7, 0xa8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xf7, 0x73, 0xab, 0xfe, 0xf6, 0x83, 0xea, 0x85, 0x05, 0xc6,
0xcd, 0xdb, 0x86, 0x9a, 0xf0, 0x8c, 0xb2, 0xc4, 0xe5, 0x22, 0xf1, 0x12, 0x64, 0xfa, 0xfd, 0x79,
0x75, 0x89, 0xe6, 0xa9, 0xfc, 0xdd, 0xbf, 0xc0, 0x6b, 0x8d, 0xc6, 0x3b, 0x9a, 0xfb, 0xe2, 0x47,
0x00, 0x00, 0x00, 0xff, 0xff, 0xbb, 0x5d, 0x40, 0x26, 0x30, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,511 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta2/task.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// The view specifies a subset of [Task][google.cloud.tasks.v2beta2.Task] data.
//
// When a task is returned in a response, not all
// information is retrieved by default because some data, such as
// payloads, might be desirable to return only when needed because
// of its large size or because of the sensitivity of data that it
// contains.
type Task_View int32
const (
// Unspecified. Defaults to BASIC.
Task_VIEW_UNSPECIFIED Task_View = 0
// The basic view omits fields which can be large or can contain
// sensitive data.
//
// This view does not include the
// ([payload in AppEngineHttpRequest][google.cloud.tasks.v2beta2.AppEngineHttpRequest] and
// [payload in PullMessage][google.cloud.tasks.v2beta2.PullMessage.payload]). These payloads are
// desirable to return only when needed, because they can be large
// and because of the sensitivity of the data that you choose to
// store in it.
Task_BASIC Task_View = 1
// All information is returned.
//
// Authorization for [FULL][google.cloud.tasks.v2beta2.Task.View.FULL] requires
// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
// permission on the [Queue][google.cloud.tasks.v2beta2.Queue] resource.
Task_FULL Task_View = 2
)
var Task_View_name = map[int32]string{
0: "VIEW_UNSPECIFIED",
1: "BASIC",
2: "FULL",
}
var Task_View_value = map[string]int32{
"VIEW_UNSPECIFIED": 0,
"BASIC": 1,
"FULL": 2,
}
func (x Task_View) String() string {
return proto.EnumName(Task_View_name, int32(x))
}
func (Task_View) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_3fffa1a9946502fd, []int{0, 0}
}
// A unit of scheduled work.
type Task struct {
// Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta2.CloudTasks.CreateTask].
//
// The task name.
//
// The task name must have the following format:
// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
//
// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), colons (:), or periods (.).
// For more information, see
// [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
// * `LOCATION_ID` is the canonical ID for the task's location.
// The list of available locations can be obtained by calling
// [ListLocations][google.cloud.location.Locations.ListLocations].
// For more information, see https://cloud.google.com/about/locations/.
// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
// hyphens (-). The maximum length is 100 characters.
// * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), or underscores (_). The maximum length is 500 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required.
//
// The task's payload is used by the task's target to process the task.
// A payload is valid only if it is compatible with the queue's target.
//
// Types that are valid to be assigned to PayloadType:
// *Task_AppEngineHttpRequest
// *Task_PullMessage
PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"`
// The time when the task is scheduled to be attempted.
//
// For App Engine queues, this is when the task will be attempted or retried.
//
// For pull queues, this is the time when the task is available to
// be leased; if a task is currently leased, this is the time when
// the current lease expires, that is, the time that the task was
// leased plus the [lease_duration][google.cloud.tasks.v2beta2.LeaseTasksRequest.lease_duration].
//
// `schedule_time` will be truncated to the nearest microsecond.
ScheduleTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
// Output only. The time that the task was created.
//
// `create_time` will be truncated to the nearest second.
CreateTime *timestamp.Timestamp `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The task status.
Status *TaskStatus `protobuf:"bytes,7,opt,name=status,proto3" json:"status,omitempty"`
// Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta2.Task] has
// been returned.
View Task_View `protobuf:"varint,8,opt,name=view,proto3,enum=google.cloud.tasks.v2beta2.Task_View" json:"view,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Task) Reset() { *m = Task{} }
func (m *Task) String() string { return proto.CompactTextString(m) }
func (*Task) ProtoMessage() {}
func (*Task) Descriptor() ([]byte, []int) {
return fileDescriptor_3fffa1a9946502fd, []int{0}
}
func (m *Task) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Task.Unmarshal(m, b)
}
func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Task.Marshal(b, m, deterministic)
}
func (m *Task) XXX_Merge(src proto.Message) {
xxx_messageInfo_Task.Merge(m, src)
}
func (m *Task) XXX_Size() int {
return xxx_messageInfo_Task.Size(m)
}
func (m *Task) XXX_DiscardUnknown() {
xxx_messageInfo_Task.DiscardUnknown(m)
}
var xxx_messageInfo_Task proto.InternalMessageInfo
func (m *Task) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type isTask_PayloadType interface {
isTask_PayloadType()
}
type Task_AppEngineHttpRequest struct {
AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"`
}
type Task_PullMessage struct {
PullMessage *PullMessage `protobuf:"bytes,4,opt,name=pull_message,json=pullMessage,proto3,oneof"`
}
func (*Task_AppEngineHttpRequest) isTask_PayloadType() {}
func (*Task_PullMessage) isTask_PayloadType() {}
func (m *Task) GetPayloadType() isTask_PayloadType {
if m != nil {
return m.PayloadType
}
return nil
}
func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest {
if x, ok := m.GetPayloadType().(*Task_AppEngineHttpRequest); ok {
return x.AppEngineHttpRequest
}
return nil
}
func (m *Task) GetPullMessage() *PullMessage {
if x, ok := m.GetPayloadType().(*Task_PullMessage); ok {
return x.PullMessage
}
return nil
}
func (m *Task) GetScheduleTime() *timestamp.Timestamp {
if m != nil {
return m.ScheduleTime
}
return nil
}
func (m *Task) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Task) GetStatus() *TaskStatus {
if m != nil {
return m.Status
}
return nil
}
func (m *Task) GetView() Task_View {
if m != nil {
return m.View
}
return Task_VIEW_UNSPECIFIED
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Task) 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 _Task_OneofMarshaler, _Task_OneofUnmarshaler, _Task_OneofSizer, []interface{}{
(*Task_AppEngineHttpRequest)(nil),
(*Task_PullMessage)(nil),
}
}
func _Task_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Task)
// payload_type
switch x := m.PayloadType.(type) {
case *Task_AppEngineHttpRequest:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.AppEngineHttpRequest); err != nil {
return err
}
case *Task_PullMessage:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.PullMessage); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Task.PayloadType has unexpected type %T", x)
}
return nil
}
func _Task_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Task)
switch tag {
case 3: // payload_type.app_engine_http_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(AppEngineHttpRequest)
err := b.DecodeMessage(msg)
m.PayloadType = &Task_AppEngineHttpRequest{msg}
return true, err
case 4: // payload_type.pull_message
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PullMessage)
err := b.DecodeMessage(msg)
m.PayloadType = &Task_PullMessage{msg}
return true, err
default:
return false, nil
}
}
func _Task_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Task)
// payload_type
switch x := m.PayloadType.(type) {
case *Task_AppEngineHttpRequest:
s := proto.Size(x.AppEngineHttpRequest)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Task_PullMessage:
s := proto.Size(x.PullMessage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Status of the task.
type TaskStatus struct {
// Output only. The number of attempts dispatched.
//
// This count includes tasks which have been dispatched but haven't
// received a response.
AttemptDispatchCount int32 `protobuf:"varint,1,opt,name=attempt_dispatch_count,json=attemptDispatchCount,proto3" json:"attempt_dispatch_count,omitempty"`
// Output only. The number of attempts which have received a response.
//
// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
AttemptResponseCount int32 `protobuf:"varint,2,opt,name=attempt_response_count,json=attemptResponseCount,proto3" json:"attempt_response_count,omitempty"`
// Output only. The status of the task's first attempt.
//
// Only [dispatch_time][google.cloud.tasks.v2beta2.AttemptStatus.dispatch_time] will be set.
// The other [AttemptStatus][google.cloud.tasks.v2beta2.AttemptStatus] information is not retained by Cloud Tasks.
//
// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
FirstAttemptStatus *AttemptStatus `protobuf:"bytes,3,opt,name=first_attempt_status,json=firstAttemptStatus,proto3" json:"first_attempt_status,omitempty"`
// Output only. The status of the task's last attempt.
//
// This field is not calculated for [pull tasks][google.cloud.tasks.v2beta2.PullMessage].
LastAttemptStatus *AttemptStatus `protobuf:"bytes,4,opt,name=last_attempt_status,json=lastAttemptStatus,proto3" json:"last_attempt_status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TaskStatus) Reset() { *m = TaskStatus{} }
func (m *TaskStatus) String() string { return proto.CompactTextString(m) }
func (*TaskStatus) ProtoMessage() {}
func (*TaskStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_3fffa1a9946502fd, []int{1}
}
func (m *TaskStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TaskStatus.Unmarshal(m, b)
}
func (m *TaskStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TaskStatus.Marshal(b, m, deterministic)
}
func (m *TaskStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_TaskStatus.Merge(m, src)
}
func (m *TaskStatus) XXX_Size() int {
return xxx_messageInfo_TaskStatus.Size(m)
}
func (m *TaskStatus) XXX_DiscardUnknown() {
xxx_messageInfo_TaskStatus.DiscardUnknown(m)
}
var xxx_messageInfo_TaskStatus proto.InternalMessageInfo
func (m *TaskStatus) GetAttemptDispatchCount() int32 {
if m != nil {
return m.AttemptDispatchCount
}
return 0
}
func (m *TaskStatus) GetAttemptResponseCount() int32 {
if m != nil {
return m.AttemptResponseCount
}
return 0
}
func (m *TaskStatus) GetFirstAttemptStatus() *AttemptStatus {
if m != nil {
return m.FirstAttemptStatus
}
return nil
}
func (m *TaskStatus) GetLastAttemptStatus() *AttemptStatus {
if m != nil {
return m.LastAttemptStatus
}
return nil
}
// The status of a task attempt.
type AttemptStatus struct {
// Output only. The time that this attempt was scheduled.
//
// `schedule_time` will be truncated to the nearest microsecond.
ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
// Output only. The time that this attempt was dispatched.
//
// `dispatch_time` will be truncated to the nearest microsecond.
DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"`
// Output only. The time that this attempt response was received.
//
// `response_time` will be truncated to the nearest microsecond.
ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
// Output only. The response from the target for this attempt.
//
// If the task has not been attempted or the task is currently running
// then the response status is unset.
ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AttemptStatus) Reset() { *m = AttemptStatus{} }
func (m *AttemptStatus) String() string { return proto.CompactTextString(m) }
func (*AttemptStatus) ProtoMessage() {}
func (*AttemptStatus) Descriptor() ([]byte, []int) {
return fileDescriptor_3fffa1a9946502fd, []int{2}
}
func (m *AttemptStatus) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AttemptStatus.Unmarshal(m, b)
}
func (m *AttemptStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AttemptStatus.Marshal(b, m, deterministic)
}
func (m *AttemptStatus) XXX_Merge(src proto.Message) {
xxx_messageInfo_AttemptStatus.Merge(m, src)
}
func (m *AttemptStatus) XXX_Size() int {
return xxx_messageInfo_AttemptStatus.Size(m)
}
func (m *AttemptStatus) XXX_DiscardUnknown() {
xxx_messageInfo_AttemptStatus.DiscardUnknown(m)
}
var xxx_messageInfo_AttemptStatus proto.InternalMessageInfo
func (m *AttemptStatus) GetScheduleTime() *timestamp.Timestamp {
if m != nil {
return m.ScheduleTime
}
return nil
}
func (m *AttemptStatus) GetDispatchTime() *timestamp.Timestamp {
if m != nil {
return m.DispatchTime
}
return nil
}
func (m *AttemptStatus) GetResponseTime() *timestamp.Timestamp {
if m != nil {
return m.ResponseTime
}
return nil
}
func (m *AttemptStatus) GetResponseStatus() *status.Status {
if m != nil {
return m.ResponseStatus
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta2.Task_View", Task_View_name, Task_View_value)
proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2beta2.Task")
proto.RegisterType((*TaskStatus)(nil), "google.cloud.tasks.v2beta2.TaskStatus")
proto.RegisterType((*AttemptStatus)(nil), "google.cloud.tasks.v2beta2.AttemptStatus")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta2/task.proto", fileDescriptor_3fffa1a9946502fd)
}
var fileDescriptor_3fffa1a9946502fd = []byte{
// 601 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x5f, 0x6f, 0xda, 0x3c,
0x14, 0xc6, 0x1b, 0x9a, 0xf6, 0x2d, 0xe6, 0xcf, 0xcb, 0x3c, 0xb4, 0x46, 0x68, 0xda, 0x10, 0x52,
0x57, 0x76, 0x93, 0x6c, 0x6c, 0x37, 0x53, 0xa5, 0xa1, 0x42, 0xa9, 0x40, 0x62, 0x13, 0x0a, 0x6d,
0xa7, 0x6d, 0x17, 0x91, 0x09, 0x6e, 0x88, 0x9a, 0xc4, 0x5e, 0x7c, 0xd2, 0xaa, 0x9f, 0xa2, 0x5f,
0x65, 0x1f, 0x71, 0x8a, 0xe3, 0xd0, 0xa1, 0x76, 0xa0, 0xde, 0x71, 0xce, 0x79, 0x7e, 0x8f, 0xed,
0x47, 0x87, 0xa0, 0x03, 0x8f, 0x31, 0x2f, 0xa0, 0x96, 0x1b, 0xb0, 0x64, 0x6e, 0x01, 0x11, 0x57,
0xc2, 0xba, 0xee, 0x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49, 0x62, 0x69, 0xb3, 0xd2, 0xc3, 0xdf, 0xd1, 0xf3, 0x80, 0x3c, 0xf4, 0xd6,
0x9f, 0xea, 0xfd, 0x2c, 0x75, 0x59, 0x69, 0xb5, 0xee, 0x0a, 0xa8, 0xb2, 0x7a, 0xd8, 0x83, 0x05,
0xd4, 0x9e, 0xb8, 0x80, 0x5d, 0x54, 0x59, 0xc6, 0x2d, 0x0d, 0x0a, 0x9b, 0x0d, 0x72, 0x20, 0x37,
0x58, 0x26, 0x2f, 0x0d, 0xb6, 0x37, 0x1b, 0xe4, 0x80, 0xfa, 0x0b, 0xfc, 0xbf, 0x34, 0x58, 0xc9,
0x0a, 0xe7, 0x16, 0x31, 0x77, 0x4d, 0x15, 0x4a, 0x35, 0x97, 0x66, 0x75, 0x2f, 0x42, 0xaf, 0x5c,
0x16, 0xae, 0x09, 0xb5, 0x57, 0x4c, 0x77, 0x6c, 0x92, 0x5e, 0x62, 0xa2, 0xfd, 0xe8, 0x2a, 0xa1,
0xc7, 0x02, 0x12, 0x79, 0x26, 0x8b, 0x3d, 0xcb, 0xa3, 0x91, 0xbc, 0xa2, 0x95, 0x8d, 0x08, 0xf7,
0xc5, 0x63, 0xdf, 0xc1, 0x23, 0x59, 0xcd, 0x76, 0xa5, 0xf6, 0xc3, 0x9f, 0x00, 0x00, 0x00, 0xff,
0xff, 0x67, 0x07, 0xb1, 0x59, 0x93, 0x05, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,636 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta3/queue.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
duration "github.com/golang/protobuf/ptypes/duration"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// State of the queue.
type Queue_State int32
const (
// Unspecified state.
Queue_STATE_UNSPECIFIED Queue_State = 0
// The queue is running. Tasks can be dispatched.
//
// If the queue was created using Cloud Tasks and the queue has
// had no activity (method calls or task dispatches) for 30 days,
// the queue may take a few minutes to re-activate. Some method
// calls may return [NOT_FOUND][google.rpc.Code.NOT_FOUND] and
// tasks may not be dispatched for a few minutes until the queue
// has been re-activated.
Queue_RUNNING Queue_State = 1
// Tasks are paused by the user. If the queue is paused then Cloud
// Tasks will stop delivering tasks from it, but more tasks can
// still be added to it by the user.
Queue_PAUSED Queue_State = 2
// The queue is disabled.
//
// A queue becomes `DISABLED` when
// [queue.yaml](https://cloud.google.com/appengine/docs/python/config/queueref) or
// [queue.xml](https://cloud.google.com/appengine/docs/standard/java/config/queueref) is uploaded
// which does not contain the queue. You cannot directly disable a queue.
//
// When a queue is disabled, tasks can still be added to a queue
// but the tasks are not dispatched.
//
// To permanently delete this queue and all of its tasks, call
// [DeleteQueue][google.cloud.tasks.v2beta3.CloudTasks.DeleteQueue].
Queue_DISABLED Queue_State = 3
)
var Queue_State_name = map[int32]string{
0: "STATE_UNSPECIFIED",
1: "RUNNING",
2: "PAUSED",
3: "DISABLED",
}
var Queue_State_value = map[string]int32{
"STATE_UNSPECIFIED": 0,
"RUNNING": 1,
"PAUSED": 2,
"DISABLED": 3,
}
func (x Queue_State) String() string {
return proto.EnumName(Queue_State_name, int32(x))
}
func (Queue_State) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_36e1ae9449bd88db, []int{0, 0}
}
// A queue is a container of related tasks. Queues are configured to manage
// how those tasks are dispatched. Configurable properties include rate limits,
// retry options, queue types, and others.
type Queue struct {
// Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue],
// after which it becomes output only.
//
// The queue name.
//
// The queue name must have the following format:
// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID`
//
// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), colons (:), or periods (.).
// For more information, see
// [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
// * `LOCATION_ID` is the canonical ID for the queue's location.
// The list of available locations can be obtained by calling
// [ListLocations][google.cloud.location.Locations.ListLocations].
// For more information, see https://cloud.google.com/about/locations/.
// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
// hyphens (-). The maximum length is 100 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Caller-specified and required in [CreateQueue][google.cloud.tasks.v2beta3.CloudTasks.CreateQueue][],
// after which the queue config type becomes output only, though fields within
// the config are mutable.
//
// The queue's type.
//
// The type applies to all tasks in the queue.
//
// Types that are valid to be assigned to QueueType:
// *Queue_AppEngineHttpQueue
QueueType isQueue_QueueType `protobuf_oneof:"queue_type"`
// Rate limits for task dispatches.
//
// [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] and
// [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] are related because they both
// control task attempts however they control how tasks are
// attempted in different ways:
//
// * [rate_limits][google.cloud.tasks.v2beta3.Queue.rate_limits] controls the total rate of
// dispatches from a queue (i.e. all traffic dispatched from the
// queue, regardless of whether the dispatch is from a first
// attempt or a retry).
// * [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls what happens to
// particular a task after its first attempt fails. That is,
// [retry_config][google.cloud.tasks.v2beta3.Queue.retry_config] controls task retries (the
// second attempt, third attempt, etc).
RateLimits *RateLimits `protobuf:"bytes,4,opt,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"`
// Settings that determine the retry behavior.
//
// * For tasks created using Cloud Tasks: the queue-level retry settings
// apply to all tasks in the queue that were created using Cloud Tasks.
// Retry settings cannot be set on individual tasks.
// * For tasks created using the App Engine SDK: the queue-level retry
// settings apply to all tasks in the queue which do not have retry settings
// explicitly set on the task and were created by the App Engine SDK. See
// [App Engine documentation](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/retrying-tasks).
RetryConfig *RetryConfig `protobuf:"bytes,5,opt,name=retry_config,json=retryConfig,proto3" json:"retry_config,omitempty"`
// Output only. The state of the queue.
//
// `state` can only be changed by called
// [PauseQueue][google.cloud.tasks.v2beta3.CloudTasks.PauseQueue],
// [ResumeQueue][google.cloud.tasks.v2beta3.CloudTasks.ResumeQueue], or uploading
// [queue.yaml/xml](https://cloud.google.com/appengine/docs/python/config/queueref).
// [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] cannot be used to change `state`.
State Queue_State `protobuf:"varint,6,opt,name=state,proto3,enum=google.cloud.tasks.v2beta3.Queue_State" json:"state,omitempty"`
// Output only. The last time this queue was purged.
//
// All tasks that were [created][google.cloud.tasks.v2beta3.Task.create_time] before this time
// were purged.
//
// A queue can be purged using [PurgeQueue][google.cloud.tasks.v2beta3.CloudTasks.PurgeQueue], the
// [App Engine Task Queue SDK, or the Cloud Console](https://cloud.google.com/appengine/docs/standard/python/taskqueue/push/deleting-tasks-and-queues#purging_all_tasks_from_a_queue).
//
// Purge time will be truncated to the nearest microsecond. Purge
// time will be unset if the queue has never been purged.
PurgeTime *timestamp.Timestamp `protobuf:"bytes,7,opt,name=purge_time,json=purgeTime,proto3" json:"purge_time,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Queue) Reset() { *m = Queue{} }
func (m *Queue) String() string { return proto.CompactTextString(m) }
func (*Queue) ProtoMessage() {}
func (*Queue) Descriptor() ([]byte, []int) {
return fileDescriptor_36e1ae9449bd88db, []int{0}
}
func (m *Queue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Queue.Unmarshal(m, b)
}
func (m *Queue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Queue.Marshal(b, m, deterministic)
}
func (m *Queue) XXX_Merge(src proto.Message) {
xxx_messageInfo_Queue.Merge(m, src)
}
func (m *Queue) XXX_Size() int {
return xxx_messageInfo_Queue.Size(m)
}
func (m *Queue) XXX_DiscardUnknown() {
xxx_messageInfo_Queue.DiscardUnknown(m)
}
var xxx_messageInfo_Queue proto.InternalMessageInfo
func (m *Queue) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type isQueue_QueueType interface {
isQueue_QueueType()
}
type Queue_AppEngineHttpQueue struct {
AppEngineHttpQueue *AppEngineHttpQueue `protobuf:"bytes,3,opt,name=app_engine_http_queue,json=appEngineHttpQueue,proto3,oneof"`
}
func (*Queue_AppEngineHttpQueue) isQueue_QueueType() {}
func (m *Queue) GetQueueType() isQueue_QueueType {
if m != nil {
return m.QueueType
}
return nil
}
func (m *Queue) GetAppEngineHttpQueue() *AppEngineHttpQueue {
if x, ok := m.GetQueueType().(*Queue_AppEngineHttpQueue); ok {
return x.AppEngineHttpQueue
}
return nil
}
func (m *Queue) GetRateLimits() *RateLimits {
if m != nil {
return m.RateLimits
}
return nil
}
func (m *Queue) GetRetryConfig() *RetryConfig {
if m != nil {
return m.RetryConfig
}
return nil
}
func (m *Queue) GetState() Queue_State {
if m != nil {
return m.State
}
return Queue_STATE_UNSPECIFIED
}
func (m *Queue) GetPurgeTime() *timestamp.Timestamp {
if m != nil {
return m.PurgeTime
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Queue) 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 _Queue_OneofMarshaler, _Queue_OneofUnmarshaler, _Queue_OneofSizer, []interface{}{
(*Queue_AppEngineHttpQueue)(nil),
}
}
func _Queue_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Queue)
// queue_type
switch x := m.QueueType.(type) {
case *Queue_AppEngineHttpQueue:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.AppEngineHttpQueue); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Queue.QueueType has unexpected type %T", x)
}
return nil
}
func _Queue_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Queue)
switch tag {
case 3: // queue_type.app_engine_http_queue
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(AppEngineHttpQueue)
err := b.DecodeMessage(msg)
m.QueueType = &Queue_AppEngineHttpQueue{msg}
return true, err
default:
return false, nil
}
}
func _Queue_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Queue)
// queue_type
switch x := m.QueueType.(type) {
case *Queue_AppEngineHttpQueue:
s := proto.Size(x.AppEngineHttpQueue)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Rate limits.
//
// This message determines the maximum rate that tasks can be dispatched by a
// queue, regardless of whether the dispatch is a first task attempt or a retry.
//
// Note: The debugging command, [RunTask][google.cloud.tasks.v2beta3.CloudTasks.RunTask], will run a task
// even if the queue has reached its [RateLimits][google.cloud.tasks.v2beta3.RateLimits].
type RateLimits struct {
// The maximum rate at which tasks are dispatched from this queue.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// * For [App Engine queues][google.cloud.tasks.v2beta3.AppEngineHttpQueue], the maximum allowed value
// is 500.
//
//
// This field has the same meaning as
// [rate in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#rate).
MaxDispatchesPerSecond float64 `protobuf:"fixed64,1,opt,name=max_dispatches_per_second,json=maxDispatchesPerSecond,proto3" json:"max_dispatches_per_second,omitempty"`
// Output only. The max burst size.
//
// Max burst size limits how fast tasks in queue are processed when
// many tasks are in the queue and the rate is high. This field
// allows the queue to have a high rate so processing starts shortly
// after a task is enqueued, but still limits resource usage when
// many tasks are enqueued in a short period of time.
//
// The [token bucket](https://wikipedia.org/wiki/Token_Bucket)
// algorithm is used to control the rate of task dispatches. Each
// queue has a token bucket that holds tokens, up to the maximum
// specified by `max_burst_size`. Each time a task is dispatched, a
// token is removed from the bucket. Tasks will be dispatched until
// the queue's bucket runs out of tokens. The bucket will be
// continuously refilled with new tokens based on
// [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
//
// Cloud Tasks will pick the value of `max_burst_size` based on the
// value of
// [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second].
//
// For App Engine queues that were created or updated using
// `queue.yaml/xml`, `max_burst_size` is equal to
// [bucket_size](https://cloud.google.com/appengine/docs/standard/python/config/queueref#bucket_size).
// Since `max_burst_size` is output only, if
// [UpdateQueue][google.cloud.tasks.v2beta3.CloudTasks.UpdateQueue] is called on a queue
// created by `queue.yaml/xml`, `max_burst_size` will be reset based
// on the value of
// [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second],
// regardless of whether
// [max_dispatches_per_second][google.cloud.tasks.v2beta3.RateLimits.max_dispatches_per_second]
// is updated.
//
MaxBurstSize int32 `protobuf:"varint,2,opt,name=max_burst_size,json=maxBurstSize,proto3" json:"max_burst_size,omitempty"`
// The maximum number of concurrent tasks that Cloud Tasks allows
// to be dispatched for this queue. After this threshold has been
// reached, Cloud Tasks stops dispatching tasks until the number of
// concurrent requests decreases.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// The maximum allowed value is 5,000.
//
//
// This field has the same meaning as
// [max_concurrent_requests in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#max_concurrent_requests).
MaxConcurrentDispatches int32 `protobuf:"varint,3,opt,name=max_concurrent_dispatches,json=maxConcurrentDispatches,proto3" json:"max_concurrent_dispatches,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RateLimits) Reset() { *m = RateLimits{} }
func (m *RateLimits) String() string { return proto.CompactTextString(m) }
func (*RateLimits) ProtoMessage() {}
func (*RateLimits) Descriptor() ([]byte, []int) {
return fileDescriptor_36e1ae9449bd88db, []int{1}
}
func (m *RateLimits) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RateLimits.Unmarshal(m, b)
}
func (m *RateLimits) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RateLimits.Marshal(b, m, deterministic)
}
func (m *RateLimits) XXX_Merge(src proto.Message) {
xxx_messageInfo_RateLimits.Merge(m, src)
}
func (m *RateLimits) XXX_Size() int {
return xxx_messageInfo_RateLimits.Size(m)
}
func (m *RateLimits) XXX_DiscardUnknown() {
xxx_messageInfo_RateLimits.DiscardUnknown(m)
}
var xxx_messageInfo_RateLimits proto.InternalMessageInfo
func (m *RateLimits) GetMaxDispatchesPerSecond() float64 {
if m != nil {
return m.MaxDispatchesPerSecond
}
return 0
}
func (m *RateLimits) GetMaxBurstSize() int32 {
if m != nil {
return m.MaxBurstSize
}
return 0
}
func (m *RateLimits) GetMaxConcurrentDispatches() int32 {
if m != nil {
return m.MaxConcurrentDispatches
}
return 0
}
// Retry config.
//
// These settings determine when a failed task attempt is retried.
type RetryConfig struct {
// Number of attempts per task.
//
// Cloud Tasks will attempt the task `max_attempts` times (that is, if the
// first attempt fails, then there will be `max_attempts - 1` retries). Must
// be >= -1.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
// -1 indicates unlimited attempts.
//
// This field has the same meaning as
// [task_retry_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxAttempts int32 `protobuf:"varint,1,opt,name=max_attempts,json=maxAttempts,proto3" json:"max_attempts,omitempty"`
// If positive, `max_retry_duration` specifies the time limit for
// retrying a failed task, measured from when the task was first
// attempted. Once `max_retry_duration` time has passed *and* the
// task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts]
// times, no further attempts will be made and the task will be
// deleted.
//
// If zero, then the task age is unlimited.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// `max_retry_duration` will be truncated to the nearest second.
//
// This field has the same meaning as
// [task_age_limit in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxRetryDuration *duration.Duration `protobuf:"bytes,2,opt,name=max_retry_duration,json=maxRetryDuration,proto3" json:"max_retry_duration,omitempty"`
// A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between
// [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and
// [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails,
// if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be
// retried.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// `min_backoff` will be truncated to the nearest second.
//
// This field has the same meaning as
// [min_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MinBackoff *duration.Duration `protobuf:"bytes,3,opt,name=min_backoff,json=minBackoff,proto3" json:"min_backoff,omitempty"`
// A task will be [scheduled][google.cloud.tasks.v2beta3.Task.schedule_time] for retry between
// [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] and
// [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] duration after it fails,
// if the queue's [RetryConfig][google.cloud.tasks.v2beta3.RetryConfig] specifies that the task should be
// retried.
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// `max_backoff` will be truncated to the nearest second.
//
// This field has the same meaning as
// [max_backoff_seconds in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxBackoff *duration.Duration `protobuf:"bytes,4,opt,name=max_backoff,json=maxBackoff,proto3" json:"max_backoff,omitempty"`
// The time between retries will double `max_doublings` times.
//
// A task's retry interval starts at
// [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff], then doubles
// `max_doublings` times, then increases linearly, and finally
// retries retries at intervals of
// [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] up to
// [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts] times.
//
// For example, if [min_backoff][google.cloud.tasks.v2beta3.RetryConfig.min_backoff] is 10s,
// [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] is 300s, and
// `max_doublings` is 3, then the a task will first be retried in
// 10s. The retry interval will double three times, and then
// increase linearly by 2^3 * 10s. Finally, the task will retry at
// intervals of [max_backoff][google.cloud.tasks.v2beta3.RetryConfig.max_backoff] until the
// task has been attempted [max_attempts][google.cloud.tasks.v2beta3.RetryConfig.max_attempts]
// times. Thus, the requests will retry at 10s, 20s, 40s, 80s, 160s,
// 240s, 300s, 300s, ....
//
// If unspecified when the queue is created, Cloud Tasks will pick the
// default.
//
//
// This field has the same meaning as
// [max_doublings in queue.yaml/xml](https://cloud.google.com/appengine/docs/standard/python/config/queueref#retry_parameters).
MaxDoublings int32 `protobuf:"varint,5,opt,name=max_doublings,json=maxDoublings,proto3" json:"max_doublings,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RetryConfig) Reset() { *m = RetryConfig{} }
func (m *RetryConfig) String() string { return proto.CompactTextString(m) }
func (*RetryConfig) ProtoMessage() {}
func (*RetryConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_36e1ae9449bd88db, []int{2}
}
func (m *RetryConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RetryConfig.Unmarshal(m, b)
}
func (m *RetryConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RetryConfig.Marshal(b, m, deterministic)
}
func (m *RetryConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RetryConfig.Merge(m, src)
}
func (m *RetryConfig) XXX_Size() int {
return xxx_messageInfo_RetryConfig.Size(m)
}
func (m *RetryConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RetryConfig.DiscardUnknown(m)
}
var xxx_messageInfo_RetryConfig proto.InternalMessageInfo
func (m *RetryConfig) GetMaxAttempts() int32 {
if m != nil {
return m.MaxAttempts
}
return 0
}
func (m *RetryConfig) GetMaxRetryDuration() *duration.Duration {
if m != nil {
return m.MaxRetryDuration
}
return nil
}
func (m *RetryConfig) GetMinBackoff() *duration.Duration {
if m != nil {
return m.MinBackoff
}
return nil
}
func (m *RetryConfig) GetMaxBackoff() *duration.Duration {
if m != nil {
return m.MaxBackoff
}
return nil
}
func (m *RetryConfig) GetMaxDoublings() int32 {
if m != nil {
return m.MaxDoublings
}
return 0
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta3.Queue_State", Queue_State_name, Queue_State_value)
proto.RegisterType((*Queue)(nil), "google.cloud.tasks.v2beta3.Queue")
proto.RegisterType((*RateLimits)(nil), "google.cloud.tasks.v2beta3.RateLimits")
proto.RegisterType((*RetryConfig)(nil), "google.cloud.tasks.v2beta3.RetryConfig")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta3/queue.proto", fileDescriptor_36e1ae9449bd88db)
}
var fileDescriptor_36e1ae9449bd88db = []byte{
// 646 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0xcf, 0x4e, 0xdb, 0x4e,
0x10, 0xc7, 0x31, 0x10, 0xf8, 0x31, 0xce, 0x0f, 0xa5, 0x2b, 0xd1, 0x86, 0xa8, 0xa2, 0x69, 0x5a,
0x41, 0x4e, 0xb6, 0x04, 0x27, 0xa8, 0xaa, 0x2a, 0x21, 0x29, 0xa4, 0x42, 0x51, 0xea, 0xc0, 0xa5,
0x17, 0x6b, 0xe3, 0x6c, 0x8c, 0x45, 0xf6, 0x4f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xa4, 0x8e, 0xfd, 0x98, 0x09, 0x6c, 0xc4, 0xcf, 0x43, 0x54, 0x25, 0xe6, 0x4f,
0x7f, 0x32, 0xef, 0xd0, 0x9a, 0x6c, 0x20, 0x7b, 0xf4, 0x2b, 0x00, 0x00, 0xff, 0xff, 0xdd, 0x0d,
0x1e, 0x57, 0xf1, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,483 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta3/target.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// The HTTP method used to execute the task.
type HttpMethod int32
const (
// HTTP method unspecified
HttpMethod_HTTP_METHOD_UNSPECIFIED HttpMethod = 0
// HTTP POST
HttpMethod_POST HttpMethod = 1
// HTTP GET
HttpMethod_GET HttpMethod = 2
// HTTP HEAD
HttpMethod_HEAD HttpMethod = 3
// HTTP PUT
HttpMethod_PUT HttpMethod = 4
// HTTP DELETE
HttpMethod_DELETE HttpMethod = 5
)
var HttpMethod_name = map[int32]string{
0: "HTTP_METHOD_UNSPECIFIED",
1: "POST",
2: "GET",
3: "HEAD",
4: "PUT",
5: "DELETE",
}
var HttpMethod_value = map[string]int32{
"HTTP_METHOD_UNSPECIFIED": 0,
"POST": 1,
"GET": 2,
"HEAD": 3,
"PUT": 4,
"DELETE": 5,
}
func (x HttpMethod) String() string {
return proto.EnumName(HttpMethod_name, int32(x))
}
func (HttpMethod) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_595de6119aed6d9e, []int{0}
}
// App Engine HTTP queue.
//
// The task will be delivered to the App Engine application hostname
// specified by its [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] and [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest].
// The documentation for [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] explains how the
// task's host URL is constructed.
//
// Using [AppEngineHttpQueue][google.cloud.tasks.v2beta3.AppEngineHttpQueue] requires
// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
// Google IAM permission for the project
// and the following scope:
//
// `https://www.googleapis.com/auth/cloud-platform`
type AppEngineHttpQueue struct {
// Overrides for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
//
// If set, `app_engine_routing_override` is used for all tasks in
// the queue, no matter what the setting is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
AppEngineRoutingOverride *AppEngineRouting `protobuf:"bytes,1,opt,name=app_engine_routing_override,json=appEngineRoutingOverride,proto3" json:"app_engine_routing_override,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineHttpQueue) Reset() { *m = AppEngineHttpQueue{} }
func (m *AppEngineHttpQueue) String() string { return proto.CompactTextString(m) }
func (*AppEngineHttpQueue) ProtoMessage() {}
func (*AppEngineHttpQueue) Descriptor() ([]byte, []int) {
return fileDescriptor_595de6119aed6d9e, []int{0}
}
func (m *AppEngineHttpQueue) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineHttpQueue.Unmarshal(m, b)
}
func (m *AppEngineHttpQueue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineHttpQueue.Marshal(b, m, deterministic)
}
func (m *AppEngineHttpQueue) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineHttpQueue.Merge(m, src)
}
func (m *AppEngineHttpQueue) XXX_Size() int {
return xxx_messageInfo_AppEngineHttpQueue.Size(m)
}
func (m *AppEngineHttpQueue) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineHttpQueue.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineHttpQueue proto.InternalMessageInfo
func (m *AppEngineHttpQueue) GetAppEngineRoutingOverride() *AppEngineRouting {
if m != nil {
return m.AppEngineRoutingOverride
}
return nil
}
// App Engine HTTP request.
//
// The message defines the HTTP request that is sent to an App Engine app when
// the task is dispatched.
//
// This proto can only be used for tasks in a queue which has
// [app_engine_http_queue][google.cloud.tasks.v2beta3.Queue.app_engine_http_queue] set.
//
// Using [AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest] requires
// [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control)
// Google IAM permission for the project
// and the following scope:
//
// `https://www.googleapis.com/auth/cloud-platform`
//
// The task will be delivered to the App Engine app which belongs to the same
// project as the queue. For more information, see
// [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
// and how routing is affected by
// [dispatch files](https://cloud.google.com/appengine/docs/python/config/dispatchref).
//
// The [AppEngineRouting][google.cloud.tasks.v2beta3.AppEngineRouting] used to construct the URL that the task is
// delivered to can be set at the queue-level or task-level:
//
// * If set,
// [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override]
// is used for all tasks in the queue, no matter what the setting
// is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
//
//
// The `url` that the task will be sent to is:
//
// * `url =` [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] `+`
// [relative_uri][google.cloud.tasks.v2beta3.AppEngineHttpRequest.relative_uri]
//
// The task attempt has succeeded if the app's request handler returns
// an HTTP response code in the range [`200` - `299`]. `503` is
// considered an App Engine system error instead of an application
// error. Requests returning error `503` will be retried regardless of
// retry configuration and not counted against retry counts.
// Any other response code or a failure to receive a response before the
// deadline is a failed attempt.
type AppEngineHttpRequest struct {
// The HTTP method to use for the request. The default is POST.
//
// The app's request handler for the task's target URL must be able to handle
// HTTP requests with this http_method, otherwise the task attempt will fail
// with error code 405 (Method Not Allowed). See
// [Writing a push task request handler](https://cloud.google.com/appengine/docs/java/taskqueue/push/creating-handlers#writing_a_push_task_request_handler)
// and the documentation for the request handlers in the language your app is
// written in e.g.
// [Python Request Handler](https://cloud.google.com/appengine/docs/python/tools/webapp/requesthandlerclass).
HttpMethod HttpMethod `protobuf:"varint,1,opt,name=http_method,json=httpMethod,proto3,enum=google.cloud.tasks.v2beta3.HttpMethod" json:"http_method,omitempty"`
// Task-level setting for App Engine routing.
//
// If set,
// [app_engine_routing_override][google.cloud.tasks.v2beta3.AppEngineHttpQueue.app_engine_routing_override]
// is used for all tasks in the queue, no matter what the setting is for the
// [task-level app_engine_routing][google.cloud.tasks.v2beta3.AppEngineHttpRequest.app_engine_routing].
AppEngineRouting *AppEngineRouting `protobuf:"bytes,2,opt,name=app_engine_routing,json=appEngineRouting,proto3" json:"app_engine_routing,omitempty"`
// The relative URI.
//
// The relative URI must begin with "/" and must be a valid HTTP relative URI.
// It can contain a path and query string arguments.
// If the relative URI is empty, then the root path "/" will be used.
// No spaces are allowed, and the maximum length allowed is 2083 characters.
RelativeUri string `protobuf:"bytes,3,opt,name=relative_uri,json=relativeUri,proto3" json:"relative_uri,omitempty"`
// HTTP request headers.
//
// This map contains the header field names and values.
// Headers can be set when the
// [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
// Repeated headers are not supported but a header value can contain commas.
//
// Cloud Tasks sets some headers to default values:
//
// * `User-Agent`: By default, this header is
// `"AppEngine-Google; (+http://code.google.com/appengine)"`.
// This header can be modified, but Cloud Tasks will append
// `"AppEngine-Google; (+http://code.google.com/appengine)"` to the
// modified `User-Agent`.
//
// If the task has a [body][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body], Cloud
// Tasks sets the following headers:
//
// * `Content-Type`: By default, the `Content-Type` header is set to
// `"application/octet-stream"`. The default can be overridden by explicitly
// setting `Content-Type` to a particular media type when the
// [task is created][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
// For example, `Content-Type` can be set to `"application/json"`.
// * `Content-Length`: This is computed by Cloud Tasks. This value is
// output only. It cannot be changed.
//
// The headers below cannot be set or overridden:
//
// * `Host`
// * `X-Google-*`
// * `X-AppEngine-*`
//
// In addition, Cloud Tasks sets some headers when the task is dispatched,
// such as headers containing information about the task; see
// [request headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
// These headers are set only when the task is dispatched, so they are not
// visible when the task is returned in a Cloud Tasks response.
//
// Although there is no specific limit for the maximum number of headers or
// the size, there is a limit on the maximum size of the [Task][google.cloud.tasks.v2beta3.Task]. For more
// information, see the [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask] documentation.
Headers map[string]string `protobuf:"bytes,4,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
// HTTP request body.
//
// A request body is allowed only if the HTTP method is POST or PUT. It is
// an error to set a body on a task with an incompatible [HttpMethod][google.cloud.tasks.v2beta3.HttpMethod].
Body []byte `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineHttpRequest) Reset() { *m = AppEngineHttpRequest{} }
func (m *AppEngineHttpRequest) String() string { return proto.CompactTextString(m) }
func (*AppEngineHttpRequest) ProtoMessage() {}
func (*AppEngineHttpRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_595de6119aed6d9e, []int{1}
}
func (m *AppEngineHttpRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineHttpRequest.Unmarshal(m, b)
}
func (m *AppEngineHttpRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineHttpRequest.Marshal(b, m, deterministic)
}
func (m *AppEngineHttpRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineHttpRequest.Merge(m, src)
}
func (m *AppEngineHttpRequest) XXX_Size() int {
return xxx_messageInfo_AppEngineHttpRequest.Size(m)
}
func (m *AppEngineHttpRequest) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineHttpRequest.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineHttpRequest proto.InternalMessageInfo
func (m *AppEngineHttpRequest) GetHttpMethod() HttpMethod {
if m != nil {
return m.HttpMethod
}
return HttpMethod_HTTP_METHOD_UNSPECIFIED
}
func (m *AppEngineHttpRequest) GetAppEngineRouting() *AppEngineRouting {
if m != nil {
return m.AppEngineRouting
}
return nil
}
func (m *AppEngineHttpRequest) GetRelativeUri() string {
if m != nil {
return m.RelativeUri
}
return ""
}
func (m *AppEngineHttpRequest) GetHeaders() map[string]string {
if m != nil {
return m.Headers
}
return nil
}
func (m *AppEngineHttpRequest) GetBody() []byte {
if m != nil {
return m.Body
}
return nil
}
// App Engine Routing.
//
// Specifies the target URI. Since this target type dispatches tasks to secure
// app handlers, unsecure app handlers, and URIs restricted with
// [`login: admin`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
// the protocol (for example, HTTP or HTTPS) cannot be explictly specified.
// Task dispatches do not follow redirects and cannot target URI paths
// restricted with
// [`login: required`](https://cloud.google.com/appengine/docs/standard/python/config/appref)
// because tasks are not run as any user.
//
// For more information about services, versions, and instances see
// [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine),
// [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine),
// [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed),
// and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
type AppEngineRouting struct {
// App service.
//
// By default, the task is sent to the service which is the default
// service when the task is attempted.
//
// For some queues or tasks which were created using the App Engine
// Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable
// into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks
// which were created using the App Engine SDK use a custom domain
// name; custom domains are not parsed by Cloud Tasks. If
// [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then
// [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string.
Service string `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"`
// App version.
//
// By default, the task is sent to the version which is the default
// version when the task is attempted.
//
// For some queues or tasks which were created using the App Engine
// Task Queue API, [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable
// into [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. For example, some tasks
// which were created using the App Engine SDK use a custom domain
// name; custom domains are not parsed by Cloud Tasks. If
// [host][google.cloud.tasks.v2beta3.AppEngineRouting.host] is not parsable, then
// [service][google.cloud.tasks.v2beta3.AppEngineRouting.service],
// [version][google.cloud.tasks.v2beta3.AppEngineRouting.version], and
// [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance] are the empty string.
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
// App instance.
//
// By default, the task is sent to an instance which is available when
// the task is attempted.
//
// Requests can only be sent to a specific instance if
// [manual scaling is used in App Engine Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes).
// App Engine Flex does not support instances. For more information, see
// [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed)
// and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).
Instance string `protobuf:"bytes,3,opt,name=instance,proto3" json:"instance,omitempty"`
// Output only. The host that the task is sent to.
//
// The host is constructed from the domain name of the app associated with
// the queue's project ID (for example <app-id>.appspot.com), and the
// [service][google.cloud.tasks.v2beta3.AppEngineRouting.service], [version][google.cloud.tasks.v2beta3.AppEngineRouting.version],
// and [instance][google.cloud.tasks.v2beta3.AppEngineRouting.instance]. Tasks which were created using
// the App Engine SDK might have a custom domain name.
//
// For more information, see
// [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
Host string `protobuf:"bytes,4,opt,name=host,proto3" json:"host,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AppEngineRouting) Reset() { *m = AppEngineRouting{} }
func (m *AppEngineRouting) String() string { return proto.CompactTextString(m) }
func (*AppEngineRouting) ProtoMessage() {}
func (*AppEngineRouting) Descriptor() ([]byte, []int) {
return fileDescriptor_595de6119aed6d9e, []int{2}
}
func (m *AppEngineRouting) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AppEngineRouting.Unmarshal(m, b)
}
func (m *AppEngineRouting) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AppEngineRouting.Marshal(b, m, deterministic)
}
func (m *AppEngineRouting) XXX_Merge(src proto.Message) {
xxx_messageInfo_AppEngineRouting.Merge(m, src)
}
func (m *AppEngineRouting) XXX_Size() int {
return xxx_messageInfo_AppEngineRouting.Size(m)
}
func (m *AppEngineRouting) XXX_DiscardUnknown() {
xxx_messageInfo_AppEngineRouting.DiscardUnknown(m)
}
var xxx_messageInfo_AppEngineRouting proto.InternalMessageInfo
func (m *AppEngineRouting) GetService() string {
if m != nil {
return m.Service
}
return ""
}
func (m *AppEngineRouting) GetVersion() string {
if m != nil {
return m.Version
}
return ""
}
func (m *AppEngineRouting) GetInstance() string {
if m != nil {
return m.Instance
}
return ""
}
func (m *AppEngineRouting) GetHost() string {
if m != nil {
return m.Host
}
return ""
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta3.HttpMethod", HttpMethod_name, HttpMethod_value)
proto.RegisterType((*AppEngineHttpQueue)(nil), "google.cloud.tasks.v2beta3.AppEngineHttpQueue")
proto.RegisterType((*AppEngineHttpRequest)(nil), "google.cloud.tasks.v2beta3.AppEngineHttpRequest")
proto.RegisterMapType((map[string]string)(nil), "google.cloud.tasks.v2beta3.AppEngineHttpRequest.HeadersEntry")
proto.RegisterType((*AppEngineRouting)(nil), "google.cloud.tasks.v2beta3.AppEngineRouting")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta3/target.proto", fileDescriptor_595de6119aed6d9e)
}
var fileDescriptor_595de6119aed6d9e = []byte{
// 511 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0x51, 0x6b, 0xd3, 0x50,
0x14, 0x36, 0x4d, 0xbb, 0xae, 0xa7, 0x45, 0xc2, 0x65, 0x60, 0xe8, 0x44, 0x6a, 0x1f, 0xb4, 0x88,
0x24, 0xd0, 0xbd, 0xc8, 0x44, 0x64, 0xb3, 0x71, 0x1d, 0x38, 0x1b, 0xb3, 0x14, 0x61, 0x3e, 0x84,
0xdb, 0xf6, 0x90, 0x5e, 0xda, 0xdd, 0x1b, 0x6f, 0x6e, 0x02, 0x7d, 0xf4, 0xc9, 0xbf, 0x2d, 0xb9,
0x49, 0xeb, 0xac, 0x3a, 0xc4, 0xb7, 0xf3, 0x7d, 0xf9, 0xce, 0x77, 0xee, 0xf9, 0xc2, 0x81, 0xe7,
0xb1, 0x10, 0xf1, 0x1a, 0xdd, 0xf9, 0x5a, 0x64, 0x0b, 0x57, 0xd1, 0x74, 0x95, 0xba, 0xf9, 0x70,
0x86, 0x8a, 0x9e, 0xb8, 0x8a, 0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0x25, 0x8d, 0xc5, 0x9a, 0xf2, 0xd8, 0x11, 0x32, 0x76, 0x63, 0xe4,
0xfa, 0x5e, 0xdc, 0xf2, 0x13, 0x4d, 0x58, 0xfa, 0xa7, 0xab, 0x7c, 0xad, 0xd1, 0xec, 0x40, 0x6b,
0x4f, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0x8e, 0x26, 0x4d, 0x45, 0xc0, 0x03, 0x00, 0x00,
}

View file

@ -0,0 +1,420 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/tasks/v2beta3/task.proto
package tasks
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
_ "google.golang.org/genproto/googleapis/api/annotations"
status "google.golang.org/genproto/googleapis/rpc/status"
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
// The view specifies a subset of [Task][google.cloud.tasks.v2beta3.Task] data.
//
// When a task is returned in a response, not all
// information is retrieved by default because some data, such as
// payloads, might be desirable to return only when needed because
// of its large size or because of the sensitivity of data that it
// contains.
type Task_View int32
const (
// Unspecified. Defaults to BASIC.
Task_VIEW_UNSPECIFIED Task_View = 0
// The basic view omits fields which can be large or can contain
// sensitive data.
//
// This view does not include the
// [body in AppEngineHttpRequest][google.cloud.tasks.v2beta3.AppEngineHttpRequest.body].
// Bodies are desirable to return only when needed, because they
// can be large and because of the sensitivity of the data that you
// choose to store in it.
Task_BASIC Task_View = 1
// All information is returned.
//
// Authorization for [FULL][google.cloud.tasks.v2beta3.Task.View.FULL] requires
// `cloudtasks.tasks.fullView` [Google IAM](https://cloud.google.com/iam/)
// permission on the [Queue][google.cloud.tasks.v2beta3.Queue] resource.
Task_FULL Task_View = 2
)
var Task_View_name = map[int32]string{
0: "VIEW_UNSPECIFIED",
1: "BASIC",
2: "FULL",
}
var Task_View_value = map[string]int32{
"VIEW_UNSPECIFIED": 0,
"BASIC": 1,
"FULL": 2,
}
func (x Task_View) String() string {
return proto.EnumName(Task_View_name, int32(x))
}
func (Task_View) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_ef2a735969aa09d5, []int{0, 0}
}
// A unit of scheduled work.
type Task struct {
// Optionally caller-specified in [CreateTask][google.cloud.tasks.v2beta3.CloudTasks.CreateTask].
//
// The task name.
//
// The task name must have the following format:
// `projects/PROJECT_ID/locations/LOCATION_ID/queues/QUEUE_ID/tasks/TASK_ID`
//
// * `PROJECT_ID` can contain letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), colons (:), or periods (.).
// For more information, see
// [Identifying projects](https://cloud.google.com/resource-manager/docs/creating-managing-projects#identifying_projects)
// * `LOCATION_ID` is the canonical ID for the task's location.
// The list of available locations can be obtained by calling
// [ListLocations][google.cloud.location.Locations.ListLocations].
// For more information, see https://cloud.google.com/about/locations/.
// * `QUEUE_ID` can contain letters ([A-Za-z]), numbers ([0-9]), or
// hyphens (-). The maximum length is 100 characters.
// * `TASK_ID` can contain only letters ([A-Za-z]), numbers ([0-9]),
// hyphens (-), or underscores (_). The maximum length is 500 characters.
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Required.
//
// The task's payload is used by the task's target to process the task.
// A payload is valid only if it is compatible with the queue's target.
//
// Types that are valid to be assigned to PayloadType:
// *Task_AppEngineHttpRequest
PayloadType isTask_PayloadType `protobuf_oneof:"payload_type"`
// The time when the task is scheduled to be attempted.
//
// For App Engine queues, this is when the task will be attempted or retried.
//
// `schedule_time` will be truncated to the nearest microsecond.
ScheduleTime *timestamp.Timestamp `protobuf:"bytes,4,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
// Output only. The time that the task was created.
//
// `create_time` will be truncated to the nearest second.
CreateTime *timestamp.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
// Output only. The number of attempts dispatched.
//
// This count includes tasks which have been dispatched but haven't
// received a response.
DispatchCount int32 `protobuf:"varint,6,opt,name=dispatch_count,json=dispatchCount,proto3" json:"dispatch_count,omitempty"`
// Output only. The number of attempts which have received a response.
ResponseCount int32 `protobuf:"varint,7,opt,name=response_count,json=responseCount,proto3" json:"response_count,omitempty"`
// Output only. The status of the task's first attempt.
//
// Only [dispatch_time][google.cloud.tasks.v2beta3.Attempt.dispatch_time] will be set.
// The other [Attempt][google.cloud.tasks.v2beta3.Attempt] information is not retained by Cloud Tasks.
FirstAttempt *Attempt `protobuf:"bytes,8,opt,name=first_attempt,json=firstAttempt,proto3" json:"first_attempt,omitempty"`
// Output only. The status of the task's last attempt.
LastAttempt *Attempt `protobuf:"bytes,9,opt,name=last_attempt,json=lastAttempt,proto3" json:"last_attempt,omitempty"`
// Output only. The view specifies which subset of the [Task][google.cloud.tasks.v2beta3.Task] has
// been returned.
View Task_View `protobuf:"varint,10,opt,name=view,proto3,enum=google.cloud.tasks.v2beta3.Task_View" json:"view,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Task) Reset() { *m = Task{} }
func (m *Task) String() string { return proto.CompactTextString(m) }
func (*Task) ProtoMessage() {}
func (*Task) Descriptor() ([]byte, []int) {
return fileDescriptor_ef2a735969aa09d5, []int{0}
}
func (m *Task) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Task.Unmarshal(m, b)
}
func (m *Task) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Task.Marshal(b, m, deterministic)
}
func (m *Task) XXX_Merge(src proto.Message) {
xxx_messageInfo_Task.Merge(m, src)
}
func (m *Task) XXX_Size() int {
return xxx_messageInfo_Task.Size(m)
}
func (m *Task) XXX_DiscardUnknown() {
xxx_messageInfo_Task.DiscardUnknown(m)
}
var xxx_messageInfo_Task proto.InternalMessageInfo
func (m *Task) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type isTask_PayloadType interface {
isTask_PayloadType()
}
type Task_AppEngineHttpRequest struct {
AppEngineHttpRequest *AppEngineHttpRequest `protobuf:"bytes,3,opt,name=app_engine_http_request,json=appEngineHttpRequest,proto3,oneof"`
}
func (*Task_AppEngineHttpRequest) isTask_PayloadType() {}
func (m *Task) GetPayloadType() isTask_PayloadType {
if m != nil {
return m.PayloadType
}
return nil
}
func (m *Task) GetAppEngineHttpRequest() *AppEngineHttpRequest {
if x, ok := m.GetPayloadType().(*Task_AppEngineHttpRequest); ok {
return x.AppEngineHttpRequest
}
return nil
}
func (m *Task) GetScheduleTime() *timestamp.Timestamp {
if m != nil {
return m.ScheduleTime
}
return nil
}
func (m *Task) GetCreateTime() *timestamp.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Task) GetDispatchCount() int32 {
if m != nil {
return m.DispatchCount
}
return 0
}
func (m *Task) GetResponseCount() int32 {
if m != nil {
return m.ResponseCount
}
return 0
}
func (m *Task) GetFirstAttempt() *Attempt {
if m != nil {
return m.FirstAttempt
}
return nil
}
func (m *Task) GetLastAttempt() *Attempt {
if m != nil {
return m.LastAttempt
}
return nil
}
func (m *Task) GetView() Task_View {
if m != nil {
return m.View
}
return Task_VIEW_UNSPECIFIED
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Task) 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 _Task_OneofMarshaler, _Task_OneofUnmarshaler, _Task_OneofSizer, []interface{}{
(*Task_AppEngineHttpRequest)(nil),
}
}
func _Task_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Task)
// payload_type
switch x := m.PayloadType.(type) {
case *Task_AppEngineHttpRequest:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.AppEngineHttpRequest); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Task.PayloadType has unexpected type %T", x)
}
return nil
}
func _Task_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Task)
switch tag {
case 3: // payload_type.app_engine_http_request
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(AppEngineHttpRequest)
err := b.DecodeMessage(msg)
m.PayloadType = &Task_AppEngineHttpRequest{msg}
return true, err
default:
return false, nil
}
}
func _Task_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Task)
// payload_type
switch x := m.PayloadType.(type) {
case *Task_AppEngineHttpRequest:
s := proto.Size(x.AppEngineHttpRequest)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// The status of a task attempt.
type Attempt struct {
// Output only. The time that this attempt was scheduled.
//
// `schedule_time` will be truncated to the nearest microsecond.
ScheduleTime *timestamp.Timestamp `protobuf:"bytes,1,opt,name=schedule_time,json=scheduleTime,proto3" json:"schedule_time,omitempty"`
// Output only. The time that this attempt was dispatched.
//
// `dispatch_time` will be truncated to the nearest microsecond.
DispatchTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=dispatch_time,json=dispatchTime,proto3" json:"dispatch_time,omitempty"`
// Output only. The time that this attempt response was received.
//
// `response_time` will be truncated to the nearest microsecond.
ResponseTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3" json:"response_time,omitempty"`
// Output only. The response from the target for this attempt.
//
// If `response_time` is unset, then the task has not been attempted or is
// currently running and the `response_status` field is meaningless.
ResponseStatus *status.Status `protobuf:"bytes,4,opt,name=response_status,json=responseStatus,proto3" json:"response_status,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Attempt) Reset() { *m = Attempt{} }
func (m *Attempt) String() string { return proto.CompactTextString(m) }
func (*Attempt) ProtoMessage() {}
func (*Attempt) Descriptor() ([]byte, []int) {
return fileDescriptor_ef2a735969aa09d5, []int{1}
}
func (m *Attempt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Attempt.Unmarshal(m, b)
}
func (m *Attempt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Attempt.Marshal(b, m, deterministic)
}
func (m *Attempt) XXX_Merge(src proto.Message) {
xxx_messageInfo_Attempt.Merge(m, src)
}
func (m *Attempt) XXX_Size() int {
return xxx_messageInfo_Attempt.Size(m)
}
func (m *Attempt) XXX_DiscardUnknown() {
xxx_messageInfo_Attempt.DiscardUnknown(m)
}
var xxx_messageInfo_Attempt proto.InternalMessageInfo
func (m *Attempt) GetScheduleTime() *timestamp.Timestamp {
if m != nil {
return m.ScheduleTime
}
return nil
}
func (m *Attempt) GetDispatchTime() *timestamp.Timestamp {
if m != nil {
return m.DispatchTime
}
return nil
}
func (m *Attempt) GetResponseTime() *timestamp.Timestamp {
if m != nil {
return m.ResponseTime
}
return nil
}
func (m *Attempt) GetResponseStatus() *status.Status {
if m != nil {
return m.ResponseStatus
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.tasks.v2beta3.Task_View", Task_View_name, Task_View_value)
proto.RegisterType((*Task)(nil), "google.cloud.tasks.v2beta3.Task")
proto.RegisterType((*Attempt)(nil), "google.cloud.tasks.v2beta3.Attempt")
}
func init() {
proto.RegisterFile("google/cloud/tasks/v2beta3/task.proto", fileDescriptor_ef2a735969aa09d5)
}
var fileDescriptor_ef2a735969aa09d5 = []byte{
// 538 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0xcd, 0x6e, 0xda, 0x40,
0x10, 0xc7, 0xe3, 0xc4, 0xf9, 0x60, 0x03, 0x14, 0xad,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 0xb8, 0x9a, 0x4f,
0x87, 0x0d, 0x07, 0x9f, 0x20, 0x77, 0x7c, 0x7b, 0x7d, 0xdd, 0xd8, 0x1f, 0xd4, 0x51, 0x55, 0x90,
0xe7, 0x8c, 0x93, 0x65, 0x04, 0xcf, 0x82, 0xb6, 0x7f, 0xec, 0xa3, 0x63, 0xdb, 0xc9, 0x1f, 0x73,
0x76, 0xfe, 0x73, 0xce, 0x7d, 0xb4, 0x19, 0x8a, 0x36, 0xd8, 0xdf, 0x6d, 0x60, 0x05, 0xd6, 0x60,
0x33, 0x44, 0x65, 0x70, 0xb0, 0xdb, 0xc0, 0x0a, 0xcc, 0xa6, 0xbd, 0xda, 0x18, 0xe8, 0x6f, 0xc9,
0x2c, 0x2b, 0xb6, 0x16, 0xb9, 0x88, 0xfd, 0xb9, 0x3a, 0x09, 0x37, 0x0b, 0xa3, 0xe3, 0x01, 0x43,
0x6f, 0x62, 0xbe, 0xde, 0x32, 0x80, 0x41, 0xa5, 0x9c, 0xc0, 0xac, 0x6c, 0x62, 0xe6, 0x7c, 0xeb,
0x1b, 0x30, 0xe1, 0x19, 0x61, 0x89, 0xcf, 0xf3, 0x24, 0x48, 0x28, 0x53, 0x2d, 0x06, 0xfa, 0x88,
0x88, 0x54, 0xbe, 0xf4, 0x83, 0xb8, 0x54, 0xd1, 0xe2, 0x48, 0xb1, 0x17, 0xbf, 0x02, 0x00, 0x00,
0xff, 0xff, 0xa7, 0x0f, 0xef, 0xad, 0xac, 0x04, 0x00, 0x00,
}

View file

@ -0,0 +1,872 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/texttospeech/v1/cloud_tts.proto
package texttospeech
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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
// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
type SsmlVoiceGender int32
const (
// An unspecified gender.
// In VoiceSelectionParams, this means that the client doesn't care which
// gender the selected voice will have. In the Voice field of
// ListVoicesResponse, this may mean that the voice doesn't fit any of the
// other categories in this enum, or that the gender of the voice isn't known.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0
// A male voice.
SsmlVoiceGender_MALE SsmlVoiceGender = 1
// A female voice.
SsmlVoiceGender_FEMALE SsmlVoiceGender = 2
// A gender-neutral voice.
SsmlVoiceGender_NEUTRAL SsmlVoiceGender = 3
)
var SsmlVoiceGender_name = map[int32]string{
0: "SSML_VOICE_GENDER_UNSPECIFIED",
1: "MALE",
2: "FEMALE",
3: "NEUTRAL",
}
var SsmlVoiceGender_value = map[string]int32{
"SSML_VOICE_GENDER_UNSPECIFIED": 0,
"MALE": 1,
"FEMALE": 2,
"NEUTRAL": 3,
}
func (x SsmlVoiceGender) String() string {
return proto.EnumName(SsmlVoiceGender_name, int32(x))
}
func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{0}
}
// Configuration to set up audio encoder. The encoding determines the output
// audio format that we'd like.
type AudioEncoding int32
const (
// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
// Audio content returned as LINEAR16 also contains a WAV header.
AudioEncoding_LINEAR16 AudioEncoding = 1
// MP3 audio.
AudioEncoding_MP3 AudioEncoding = 2
// Opus encoded audio wrapped in an ogg container. The result will be a
// file which can be played natively on Android, and in browsers (at least
// Chrome and Firefox). The quality of the encoding is considerably higher
// than MP3 while using approximately the same bitrate.
AudioEncoding_OGG_OPUS AudioEncoding = 3
)
var AudioEncoding_name = map[int32]string{
0: "AUDIO_ENCODING_UNSPECIFIED",
1: "LINEAR16",
2: "MP3",
3: "OGG_OPUS",
}
var AudioEncoding_value = map[string]int32{
"AUDIO_ENCODING_UNSPECIFIED": 0,
"LINEAR16": 1,
"MP3": 2,
"OGG_OPUS": 3,
}
func (x AudioEncoding) String() string {
return proto.EnumName(AudioEncoding_name, int32(x))
}
func (AudioEncoding) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{1}
}
// The top-level message sent by the client for the `ListVoices` method.
type ListVoicesRequest struct {
// Optional (but recommended)
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
// specified, the ListVoices call will only return voices that can be used to
// synthesize this language_code. E.g. when specifying "en-NZ", you will get
// supported "en-*" voices; when specifying "no", you will get supported
// "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh"
// will also get supported "cmn-*" voices; specifying "zh-hk" will also get
// supported "yue-*" voices.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListVoicesRequest) Reset() { *m = ListVoicesRequest{} }
func (m *ListVoicesRequest) String() string { return proto.CompactTextString(m) }
func (*ListVoicesRequest) ProtoMessage() {}
func (*ListVoicesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{0}
}
func (m *ListVoicesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListVoicesRequest.Unmarshal(m, b)
}
func (m *ListVoicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListVoicesRequest.Marshal(b, m, deterministic)
}
func (m *ListVoicesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListVoicesRequest.Merge(m, src)
}
func (m *ListVoicesRequest) XXX_Size() int {
return xxx_messageInfo_ListVoicesRequest.Size(m)
}
func (m *ListVoicesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListVoicesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListVoicesRequest proto.InternalMessageInfo
func (m *ListVoicesRequest) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
// The message returned to the client by the `ListVoices` method.
type ListVoicesResponse struct {
// The list of voices.
Voices []*Voice `protobuf:"bytes,1,rep,name=voices,proto3" json:"voices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListVoicesResponse) Reset() { *m = ListVoicesResponse{} }
func (m *ListVoicesResponse) String() string { return proto.CompactTextString(m) }
func (*ListVoicesResponse) ProtoMessage() {}
func (*ListVoicesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{1}
}
func (m *ListVoicesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListVoicesResponse.Unmarshal(m, b)
}
func (m *ListVoicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListVoicesResponse.Marshal(b, m, deterministic)
}
func (m *ListVoicesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListVoicesResponse.Merge(m, src)
}
func (m *ListVoicesResponse) XXX_Size() int {
return xxx_messageInfo_ListVoicesResponse.Size(m)
}
func (m *ListVoicesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListVoicesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListVoicesResponse proto.InternalMessageInfo
func (m *ListVoicesResponse) GetVoices() []*Voice {
if m != nil {
return m.Voices
}
return nil
}
// Description of a voice supported by the TTS service.
type Voice struct {
// The languages that this voice supports, expressed as
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
// "en-US", "es-419", "cmn-tw").
LanguageCodes []string `protobuf:"bytes,1,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"`
// The name of this voice. Each distinct voice has a unique name.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The gender of this voice.
SsmlGender SsmlVoiceGender `protobuf:"varint,3,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.texttospeech.v1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
// The natural sample rate (in hertz) for this voice.
NaturalSampleRateHertz int32 `protobuf:"varint,4,opt,name=natural_sample_rate_hertz,json=naturalSampleRateHertz,proto3" json:"natural_sample_rate_hertz,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Voice) Reset() { *m = Voice{} }
func (m *Voice) String() string { return proto.CompactTextString(m) }
func (*Voice) ProtoMessage() {}
func (*Voice) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{2}
}
func (m *Voice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Voice.Unmarshal(m, b)
}
func (m *Voice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Voice.Marshal(b, m, deterministic)
}
func (m *Voice) XXX_Merge(src proto.Message) {
xxx_messageInfo_Voice.Merge(m, src)
}
func (m *Voice) XXX_Size() int {
return xxx_messageInfo_Voice.Size(m)
}
func (m *Voice) XXX_DiscardUnknown() {
xxx_messageInfo_Voice.DiscardUnknown(m)
}
var xxx_messageInfo_Voice proto.InternalMessageInfo
func (m *Voice) GetLanguageCodes() []string {
if m != nil {
return m.LanguageCodes
}
return nil
}
func (m *Voice) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Voice) GetSsmlGender() SsmlVoiceGender {
if m != nil {
return m.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
func (m *Voice) GetNaturalSampleRateHertz() int32 {
if m != nil {
return m.NaturalSampleRateHertz
}
return 0
}
// The top-level message sent by the client for the `SynthesizeSpeech` method.
type SynthesizeSpeechRequest struct {
// Required. The Synthesizer requires either plain text or SSML as input.
Input *SynthesisInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
// Required. The desired voice of the synthesized audio.
Voice *VoiceSelectionParams `protobuf:"bytes,2,opt,name=voice,proto3" json:"voice,omitempty"`
// Required. The configuration of the synthesized audio.
AudioConfig *AudioConfig `protobuf:"bytes,3,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesizeSpeechRequest) Reset() { *m = SynthesizeSpeechRequest{} }
func (m *SynthesizeSpeechRequest) String() string { return proto.CompactTextString(m) }
func (*SynthesizeSpeechRequest) ProtoMessage() {}
func (*SynthesizeSpeechRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{3}
}
func (m *SynthesizeSpeechRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesizeSpeechRequest.Unmarshal(m, b)
}
func (m *SynthesizeSpeechRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesizeSpeechRequest.Marshal(b, m, deterministic)
}
func (m *SynthesizeSpeechRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesizeSpeechRequest.Merge(m, src)
}
func (m *SynthesizeSpeechRequest) XXX_Size() int {
return xxx_messageInfo_SynthesizeSpeechRequest.Size(m)
}
func (m *SynthesizeSpeechRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesizeSpeechRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesizeSpeechRequest proto.InternalMessageInfo
func (m *SynthesizeSpeechRequest) GetInput() *SynthesisInput {
if m != nil {
return m.Input
}
return nil
}
func (m *SynthesizeSpeechRequest) GetVoice() *VoiceSelectionParams {
if m != nil {
return m.Voice
}
return nil
}
func (m *SynthesizeSpeechRequest) GetAudioConfig() *AudioConfig {
if m != nil {
return m.AudioConfig
}
return nil
}
// Contains text input to be synthesized. Either `text` or `ssml` must be
// supplied. Supplying both or neither returns
// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
// characters.
type SynthesisInput struct {
// The input source, which is either plain text or SSML.
//
// Types that are valid to be assigned to InputSource:
// *SynthesisInput_Text
// *SynthesisInput_Ssml
InputSource isSynthesisInput_InputSource `protobuf_oneof:"input_source"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesisInput) Reset() { *m = SynthesisInput{} }
func (m *SynthesisInput) String() string { return proto.CompactTextString(m) }
func (*SynthesisInput) ProtoMessage() {}
func (*SynthesisInput) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{4}
}
func (m *SynthesisInput) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesisInput.Unmarshal(m, b)
}
func (m *SynthesisInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesisInput.Marshal(b, m, deterministic)
}
func (m *SynthesisInput) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesisInput.Merge(m, src)
}
func (m *SynthesisInput) XXX_Size() int {
return xxx_messageInfo_SynthesisInput.Size(m)
}
func (m *SynthesisInput) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesisInput.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesisInput proto.InternalMessageInfo
type isSynthesisInput_InputSource interface {
isSynthesisInput_InputSource()
}
type SynthesisInput_Text struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
type SynthesisInput_Ssml struct {
Ssml string `protobuf:"bytes,2,opt,name=ssml,proto3,oneof"`
}
func (*SynthesisInput_Text) isSynthesisInput_InputSource() {}
func (*SynthesisInput_Ssml) isSynthesisInput_InputSource() {}
func (m *SynthesisInput) GetInputSource() isSynthesisInput_InputSource {
if m != nil {
return m.InputSource
}
return nil
}
func (m *SynthesisInput) GetText() string {
if x, ok := m.GetInputSource().(*SynthesisInput_Text); ok {
return x.Text
}
return ""
}
func (m *SynthesisInput) GetSsml() string {
if x, ok := m.GetInputSource().(*SynthesisInput_Ssml); ok {
return x.Ssml
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SynthesisInput) 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 _SynthesisInput_OneofMarshaler, _SynthesisInput_OneofUnmarshaler, _SynthesisInput_OneofSizer, []interface{}{
(*SynthesisInput_Text)(nil),
(*SynthesisInput_Ssml)(nil),
}
}
func _SynthesisInput_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*SynthesisInput)
// input_source
switch x := m.InputSource.(type) {
case *SynthesisInput_Text:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Text)
case *SynthesisInput_Ssml:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Ssml)
case nil:
default:
return fmt.Errorf("SynthesisInput.InputSource has unexpected type %T", x)
}
return nil
}
func _SynthesisInput_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*SynthesisInput)
switch tag {
case 1: // input_source.text
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.InputSource = &SynthesisInput_Text{x}
return true, err
case 2: // input_source.ssml
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.InputSource = &SynthesisInput_Ssml{x}
return true, err
default:
return false, nil
}
}
func _SynthesisInput_OneofSizer(msg proto.Message) (n int) {
m := msg.(*SynthesisInput)
// input_source
switch x := m.InputSource.(type) {
case *SynthesisInput_Text:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Text)))
n += len(x.Text)
case *SynthesisInput_Ssml:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Ssml)))
n += len(x.Ssml)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Description of which voice to use for a synthesis request.
type VoiceSelectionParams struct {
// The language (and optionally also the region) of the voice expressed as a
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
// "en-US". Required. This should not include a script tag (e.g. use
// "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
// from the input provided in the SynthesisInput. The TTS service
// will use this parameter to help choose an appropriate voice. Note that
// the TTS service may choose a voice with a slightly different language code
// than the one selected; it may substitute a different region
// (e.g. using en-US rather than en-CA if there isn't a Canadian voice
// available), or even a different language, e.g. using "nb" (Norwegian
// Bokmal) instead of "no" (Norwegian)".
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// The name of the voice. Optional; if not set, the service will choose a
// voice based on the other parameters such as language_code and gender.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The preferred gender of the voice. Optional; if not set, the service will
// choose a voice based on the other parameters such as language_code and
// name. Note that this is only a preference, not requirement; if a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlGender SsmlVoiceGender `protobuf:"varint,3,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.texttospeech.v1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoiceSelectionParams) Reset() { *m = VoiceSelectionParams{} }
func (m *VoiceSelectionParams) String() string { return proto.CompactTextString(m) }
func (*VoiceSelectionParams) ProtoMessage() {}
func (*VoiceSelectionParams) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{5}
}
func (m *VoiceSelectionParams) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoiceSelectionParams.Unmarshal(m, b)
}
func (m *VoiceSelectionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoiceSelectionParams.Marshal(b, m, deterministic)
}
func (m *VoiceSelectionParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoiceSelectionParams.Merge(m, src)
}
func (m *VoiceSelectionParams) XXX_Size() int {
return xxx_messageInfo_VoiceSelectionParams.Size(m)
}
func (m *VoiceSelectionParams) XXX_DiscardUnknown() {
xxx_messageInfo_VoiceSelectionParams.DiscardUnknown(m)
}
var xxx_messageInfo_VoiceSelectionParams proto.InternalMessageInfo
func (m *VoiceSelectionParams) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func (m *VoiceSelectionParams) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender {
if m != nil {
return m.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
// Description of audio data to be synthesized.
type AudioConfig struct {
// Required. The format of the requested audio byte stream.
AudioEncoding AudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.texttospeech.v1.AudioEncoding" json:"audio_encoding,omitempty"`
// Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
// native speed supported by the specific voice. 2.0 is twice as fast, and
// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
// other values < 0.25 or > 4.0 will return an error.
SpeakingRate float64 `protobuf:"fixed64,2,opt,name=speaking_rate,json=speakingRate,proto3" json:"speaking_rate,omitempty"`
// Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
// semitones from the original pitch. -20 means decrease 20 semitones from the
// original pitch.
Pitch float64 `protobuf:"fixed64,3,opt,name=pitch,proto3" json:"pitch,omitempty"`
// Optional volume gain (in dB) of the normal native volume supported by the
// specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
// 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
// will play at approximately half the amplitude of the normal native signal
// amplitude. A value of +6.0 (dB) will play at approximately twice the
// amplitude of the normal native signal amplitude. Strongly recommend not to
// exceed +10 (dB) as there's usually no effective increase in loudness for
// any value greater than that.
VolumeGainDb float64 `protobuf:"fixed64,4,opt,name=volume_gain_db,json=volumeGainDb,proto3" json:"volume_gain_db,omitempty"`
// The synthesis sample rate (in hertz) for this audio. Optional. If this is
// different from the voice's natural sample rate, then the synthesizer will
// honor this request by converting to the desired sample rate (which might
// result in worse audio quality), unless the specified sample rate is not
// supported for the encoding chosen, in which case it will fail the request
// and return [google.rpc.Code.INVALID_ARGUMENT][].
SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AudioConfig) Reset() { *m = AudioConfig{} }
func (m *AudioConfig) String() string { return proto.CompactTextString(m) }
func (*AudioConfig) ProtoMessage() {}
func (*AudioConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{6}
}
func (m *AudioConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AudioConfig.Unmarshal(m, b)
}
func (m *AudioConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AudioConfig.Marshal(b, m, deterministic)
}
func (m *AudioConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_AudioConfig.Merge(m, src)
}
func (m *AudioConfig) XXX_Size() int {
return xxx_messageInfo_AudioConfig.Size(m)
}
func (m *AudioConfig) XXX_DiscardUnknown() {
xxx_messageInfo_AudioConfig.DiscardUnknown(m)
}
var xxx_messageInfo_AudioConfig proto.InternalMessageInfo
func (m *AudioConfig) GetAudioEncoding() AudioEncoding {
if m != nil {
return m.AudioEncoding
}
return AudioEncoding_AUDIO_ENCODING_UNSPECIFIED
}
func (m *AudioConfig) GetSpeakingRate() float64 {
if m != nil {
return m.SpeakingRate
}
return 0
}
func (m *AudioConfig) GetPitch() float64 {
if m != nil {
return m.Pitch
}
return 0
}
func (m *AudioConfig) GetVolumeGainDb() float64 {
if m != nil {
return m.VolumeGainDb
}
return 0
}
func (m *AudioConfig) GetSampleRateHertz() int32 {
if m != nil {
return m.SampleRateHertz
}
return 0
}
// The message returned to the client by the `SynthesizeSpeech` method.
type SynthesizeSpeechResponse struct {
// The audio data bytes encoded as specified in the request, including the
// header (For LINEAR16 audio, we include the WAV header). Note: as
// with all bytes fields, protobuffers use a pure binary representation,
// whereas JSON representations use base64.
AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesizeSpeechResponse) Reset() { *m = SynthesizeSpeechResponse{} }
func (m *SynthesizeSpeechResponse) String() string { return proto.CompactTextString(m) }
func (*SynthesizeSpeechResponse) ProtoMessage() {}
func (*SynthesizeSpeechResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_b86cfe431745e140, []int{7}
}
func (m *SynthesizeSpeechResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesizeSpeechResponse.Unmarshal(m, b)
}
func (m *SynthesizeSpeechResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesizeSpeechResponse.Marshal(b, m, deterministic)
}
func (m *SynthesizeSpeechResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesizeSpeechResponse.Merge(m, src)
}
func (m *SynthesizeSpeechResponse) XXX_Size() int {
return xxx_messageInfo_SynthesizeSpeechResponse.Size(m)
}
func (m *SynthesizeSpeechResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesizeSpeechResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesizeSpeechResponse proto.InternalMessageInfo
func (m *SynthesizeSpeechResponse) GetAudioContent() []byte {
if m != nil {
return m.AudioContent
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.texttospeech.v1.SsmlVoiceGender", SsmlVoiceGender_name, SsmlVoiceGender_value)
proto.RegisterEnum("google.cloud.texttospeech.v1.AudioEncoding", AudioEncoding_name, AudioEncoding_value)
proto.RegisterType((*ListVoicesRequest)(nil), "google.cloud.texttospeech.v1.ListVoicesRequest")
proto.RegisterType((*ListVoicesResponse)(nil), "google.cloud.texttospeech.v1.ListVoicesResponse")
proto.RegisterType((*Voice)(nil), "google.cloud.texttospeech.v1.Voice")
proto.RegisterType((*SynthesizeSpeechRequest)(nil), "google.cloud.texttospeech.v1.SynthesizeSpeechRequest")
proto.RegisterType((*SynthesisInput)(nil), "google.cloud.texttospeech.v1.SynthesisInput")
proto.RegisterType((*VoiceSelectionParams)(nil), "google.cloud.texttospeech.v1.VoiceSelectionParams")
proto.RegisterType((*AudioConfig)(nil), "google.cloud.texttospeech.v1.AudioConfig")
proto.RegisterType((*SynthesizeSpeechResponse)(nil), "google.cloud.texttospeech.v1.SynthesizeSpeechResponse")
}
// 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
// TextToSpeechClient is the client API for TextToSpeech service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TextToSpeechClient interface {
// Returns a list of [Voice][google.cloud.texttospeech.v1.Voice]
// supported for synthesis.
ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error)
}
type textToSpeechClient struct {
cc *grpc.ClientConn
}
func NewTextToSpeechClient(cc *grpc.ClientConn) TextToSpeechClient {
return &textToSpeechClient{cc}
}
func (c *textToSpeechClient) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error) {
out := new(ListVoicesResponse)
err := c.cc.Invoke(ctx, "/google.cloud.texttospeech.v1.TextToSpeech/ListVoices", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *textToSpeechClient) SynthesizeSpeech(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) {
out := new(SynthesizeSpeechResponse)
err := c.cc.Invoke(ctx, "/google.cloud.texttospeech.v1.TextToSpeech/SynthesizeSpeech", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TextToSpeechServer is the server API for TextToSpeech service.
type TextToSpeechServer interface {
// Returns a list of [Voice][google.cloud.texttospeech.v1.Voice]
// supported for synthesis.
ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
}
func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer) {
s.RegisterService(&_TextToSpeech_serviceDesc, srv)
}
func _TextToSpeech_ListVoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListVoicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TextToSpeechServer).ListVoices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.texttospeech.v1.TextToSpeech/ListVoices",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TextToSpeechServer).ListVoices(ctx, req.(*ListVoicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TextToSpeech_SynthesizeSpeech_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SynthesizeSpeechRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TextToSpeechServer).SynthesizeSpeech(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.texttospeech.v1.TextToSpeech/SynthesizeSpeech",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TextToSpeechServer).SynthesizeSpeech(ctx, req.(*SynthesizeSpeechRequest))
}
return interceptor(ctx, in, info, handler)
}
var _TextToSpeech_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.texttospeech.v1.TextToSpeech",
HandlerType: (*TextToSpeechServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListVoices",
Handler: _TextToSpeech_ListVoices_Handler,
},
{
MethodName: "SynthesizeSpeech",
Handler: _TextToSpeech_SynthesizeSpeech_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/texttospeech/v1/cloud_tts.proto",
}
func init() {
proto.RegisterFile("google/cloud/texttospeech/v1/cloud_tts.proto", fileDescriptor_b86cfe431745e140)
}
var fileDescriptor_b86cfe431745e140 = []byte{
// 868 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0x41, 0x6f, 0x1b, 0x45,
0x14, 0xee, 0xd8, 0x71, 0xda, 0x3e, 0xaf, 0x5d, 0x67, 0x88, 0xc0, 0x44, 0xa5, 0x32, 0x1b, 0x90,
0x42, 0x28, 0x36, 0x76, 0x45, 0x05, 0xed, 0x01, 0x39, 0xf6, 0xd6, 0xb1, 0xe4, 0xd8, 0x66, 0x36,
0x09, 0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0x0f, 0xb6, 0xb2, 0xe2, 0x8e, 0xf5, 0xc3, 0x34, 0x46, 0x5f, 0x1c, 0xa6, 0x90, 0x40,
0xe8, 0x1f, 0xba, 0x2e, 0x66, 0x41, 0x23, 0x60, 0xdc, 0x3c, 0x5b, 0x8d, 0x24, 0x45, 0xe3, 0x50,
0xde, 0xfc, 0x46, 0x3e, 0xcd, 0xae, 0xff, 0x46, 0xe8, 0xa7, 0xdc, 0xfd, 0x5e, 0x52, 0xad, 0x63,
0x08, 0x64, 0xcf, 0xab, 0x9f, 0x36, 0x7f, 0x5d, 0xa4, 0xcf, 0x4c, 0xfa, 0x2c, 0x9b, 0x3e, 0x3b,
0x6d, 0x9e, 0x6f, 0x9a, 0x53, 0x1f, 0xfd, 0x13, 0x00, 0x00, 0xff, 0xff, 0x38, 0xd7, 0xcf, 0x2c,
0x98, 0x07, 0x00, 0x00,
}

View file

@ -0,0 +1,883 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/texttospeech/v1beta1/cloud_tts.proto
package texttospeech
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
math "math"
)
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
// Gender of the voice as described in
// [SSML voice element](https://www.w3.org/TR/speech-synthesis11/#edef_voice).
type SsmlVoiceGender int32
const (
// An unspecified gender.
// In VoiceSelectionParams, this means that the client doesn't care which
// gender the selected voice will have. In the Voice field of
// ListVoicesResponse, this may mean that the voice doesn't fit any of the
// other categories in this enum, or that the gender of the voice isn't known.
SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED SsmlVoiceGender = 0
// A male voice.
SsmlVoiceGender_MALE SsmlVoiceGender = 1
// A female voice.
SsmlVoiceGender_FEMALE SsmlVoiceGender = 2
// A gender-neutral voice.
SsmlVoiceGender_NEUTRAL SsmlVoiceGender = 3
)
var SsmlVoiceGender_name = map[int32]string{
0: "SSML_VOICE_GENDER_UNSPECIFIED",
1: "MALE",
2: "FEMALE",
3: "NEUTRAL",
}
var SsmlVoiceGender_value = map[string]int32{
"SSML_VOICE_GENDER_UNSPECIFIED": 0,
"MALE": 1,
"FEMALE": 2,
"NEUTRAL": 3,
}
func (x SsmlVoiceGender) String() string {
return proto.EnumName(SsmlVoiceGender_name, int32(x))
}
func (SsmlVoiceGender) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{0}
}
// Configuration to set up audio encoder. The encoding determines the output
// audio format that we'd like.
type AudioEncoding int32
const (
// Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][].
AudioEncoding_AUDIO_ENCODING_UNSPECIFIED AudioEncoding = 0
// Uncompressed 16-bit signed little-endian samples (Linear PCM).
// Audio content returned as LINEAR16 also contains a WAV header.
AudioEncoding_LINEAR16 AudioEncoding = 1
// MP3 audio.
AudioEncoding_MP3 AudioEncoding = 2
// Opus encoded audio wrapped in an ogg container. The result will be a
// file which can be played natively on Android, and in browsers (at least
// Chrome and Firefox). The quality of the encoding is considerably higher
// than MP3 while using approximately the same bitrate.
AudioEncoding_OGG_OPUS AudioEncoding = 3
)
var AudioEncoding_name = map[int32]string{
0: "AUDIO_ENCODING_UNSPECIFIED",
1: "LINEAR16",
2: "MP3",
3: "OGG_OPUS",
}
var AudioEncoding_value = map[string]int32{
"AUDIO_ENCODING_UNSPECIFIED": 0,
"LINEAR16": 1,
"MP3": 2,
"OGG_OPUS": 3,
}
func (x AudioEncoding) String() string {
return proto.EnumName(AudioEncoding_name, int32(x))
}
func (AudioEncoding) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{1}
}
// The top-level message sent by the client for the `ListVoices` method.
type ListVoicesRequest struct {
// Optional (but recommended)
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. If
// specified, the ListVoices call will only return voices that can be used to
// synthesize this language_code. E.g. when specifying "en-NZ", you will get
// supported "en-*" voices; when specifying "no", you will get supported
// "no-*" (Norwegian) and "nb-*" (Norwegian Bokmal) voices; specifying "zh"
// will also get supported "cmn-*" voices; specifying "zh-hk" will also get
// supported "yue-*" voices.
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListVoicesRequest) Reset() { *m = ListVoicesRequest{} }
func (m *ListVoicesRequest) String() string { return proto.CompactTextString(m) }
func (*ListVoicesRequest) ProtoMessage() {}
func (*ListVoicesRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{0}
}
func (m *ListVoicesRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListVoicesRequest.Unmarshal(m, b)
}
func (m *ListVoicesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListVoicesRequest.Marshal(b, m, deterministic)
}
func (m *ListVoicesRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListVoicesRequest.Merge(m, src)
}
func (m *ListVoicesRequest) XXX_Size() int {
return xxx_messageInfo_ListVoicesRequest.Size(m)
}
func (m *ListVoicesRequest) XXX_DiscardUnknown() {
xxx_messageInfo_ListVoicesRequest.DiscardUnknown(m)
}
var xxx_messageInfo_ListVoicesRequest proto.InternalMessageInfo
func (m *ListVoicesRequest) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
// The message returned to the client by the `ListVoices` method.
type ListVoicesResponse struct {
// The list of voices.
Voices []*Voice `protobuf:"bytes,1,rep,name=voices,proto3" json:"voices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ListVoicesResponse) Reset() { *m = ListVoicesResponse{} }
func (m *ListVoicesResponse) String() string { return proto.CompactTextString(m) }
func (*ListVoicesResponse) ProtoMessage() {}
func (*ListVoicesResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{1}
}
func (m *ListVoicesResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListVoicesResponse.Unmarshal(m, b)
}
func (m *ListVoicesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ListVoicesResponse.Marshal(b, m, deterministic)
}
func (m *ListVoicesResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_ListVoicesResponse.Merge(m, src)
}
func (m *ListVoicesResponse) XXX_Size() int {
return xxx_messageInfo_ListVoicesResponse.Size(m)
}
func (m *ListVoicesResponse) XXX_DiscardUnknown() {
xxx_messageInfo_ListVoicesResponse.DiscardUnknown(m)
}
var xxx_messageInfo_ListVoicesResponse proto.InternalMessageInfo
func (m *ListVoicesResponse) GetVoices() []*Voice {
if m != nil {
return m.Voices
}
return nil
}
// Description of a voice supported by the TTS service.
type Voice struct {
// The languages that this voice supports, expressed as
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tags (e.g.
// "en-US", "es-419", "cmn-tw").
LanguageCodes []string `protobuf:"bytes,1,rep,name=language_codes,json=languageCodes,proto3" json:"language_codes,omitempty"`
// The name of this voice. Each distinct voice has a unique name.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The gender of this voice.
SsmlGender SsmlVoiceGender `protobuf:"varint,3,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.texttospeech.v1beta1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
// The natural sample rate (in hertz) for this voice.
NaturalSampleRateHertz int32 `protobuf:"varint,4,opt,name=natural_sample_rate_hertz,json=naturalSampleRateHertz,proto3" json:"natural_sample_rate_hertz,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Voice) Reset() { *m = Voice{} }
func (m *Voice) String() string { return proto.CompactTextString(m) }
func (*Voice) ProtoMessage() {}
func (*Voice) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{2}
}
func (m *Voice) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Voice.Unmarshal(m, b)
}
func (m *Voice) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Voice.Marshal(b, m, deterministic)
}
func (m *Voice) XXX_Merge(src proto.Message) {
xxx_messageInfo_Voice.Merge(m, src)
}
func (m *Voice) XXX_Size() int {
return xxx_messageInfo_Voice.Size(m)
}
func (m *Voice) XXX_DiscardUnknown() {
xxx_messageInfo_Voice.DiscardUnknown(m)
}
var xxx_messageInfo_Voice proto.InternalMessageInfo
func (m *Voice) GetLanguageCodes() []string {
if m != nil {
return m.LanguageCodes
}
return nil
}
func (m *Voice) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Voice) GetSsmlGender() SsmlVoiceGender {
if m != nil {
return m.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
func (m *Voice) GetNaturalSampleRateHertz() int32 {
if m != nil {
return m.NaturalSampleRateHertz
}
return 0
}
// The top-level message sent by the client for the `SynthesizeSpeech` method.
type SynthesizeSpeechRequest struct {
// Required. The Synthesizer requires either plain text or SSML as input.
Input *SynthesisInput `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"`
// Required. The desired voice of the synthesized audio.
Voice *VoiceSelectionParams `protobuf:"bytes,2,opt,name=voice,proto3" json:"voice,omitempty"`
// Required. The configuration of the synthesized audio.
AudioConfig *AudioConfig `protobuf:"bytes,3,opt,name=audio_config,json=audioConfig,proto3" json:"audio_config,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesizeSpeechRequest) Reset() { *m = SynthesizeSpeechRequest{} }
func (m *SynthesizeSpeechRequest) String() string { return proto.CompactTextString(m) }
func (*SynthesizeSpeechRequest) ProtoMessage() {}
func (*SynthesizeSpeechRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{3}
}
func (m *SynthesizeSpeechRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesizeSpeechRequest.Unmarshal(m, b)
}
func (m *SynthesizeSpeechRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesizeSpeechRequest.Marshal(b, m, deterministic)
}
func (m *SynthesizeSpeechRequest) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesizeSpeechRequest.Merge(m, src)
}
func (m *SynthesizeSpeechRequest) XXX_Size() int {
return xxx_messageInfo_SynthesizeSpeechRequest.Size(m)
}
func (m *SynthesizeSpeechRequest) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesizeSpeechRequest.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesizeSpeechRequest proto.InternalMessageInfo
func (m *SynthesizeSpeechRequest) GetInput() *SynthesisInput {
if m != nil {
return m.Input
}
return nil
}
func (m *SynthesizeSpeechRequest) GetVoice() *VoiceSelectionParams {
if m != nil {
return m.Voice
}
return nil
}
func (m *SynthesizeSpeechRequest) GetAudioConfig() *AudioConfig {
if m != nil {
return m.AudioConfig
}
return nil
}
// Contains text input to be synthesized. Either `text` or `ssml` must be
// supplied. Supplying both or neither returns
// [google.rpc.Code.INVALID_ARGUMENT][]. The input size is limited to 5000
// characters.
type SynthesisInput struct {
// The input source, which is either plain text or SSML.
//
// Types that are valid to be assigned to InputSource:
// *SynthesisInput_Text
// *SynthesisInput_Ssml
InputSource isSynthesisInput_InputSource `protobuf_oneof:"input_source"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesisInput) Reset() { *m = SynthesisInput{} }
func (m *SynthesisInput) String() string { return proto.CompactTextString(m) }
func (*SynthesisInput) ProtoMessage() {}
func (*SynthesisInput) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{4}
}
func (m *SynthesisInput) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesisInput.Unmarshal(m, b)
}
func (m *SynthesisInput) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesisInput.Marshal(b, m, deterministic)
}
func (m *SynthesisInput) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesisInput.Merge(m, src)
}
func (m *SynthesisInput) XXX_Size() int {
return xxx_messageInfo_SynthesisInput.Size(m)
}
func (m *SynthesisInput) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesisInput.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesisInput proto.InternalMessageInfo
type isSynthesisInput_InputSource interface {
isSynthesisInput_InputSource()
}
type SynthesisInput_Text struct {
Text string `protobuf:"bytes,1,opt,name=text,proto3,oneof"`
}
type SynthesisInput_Ssml struct {
Ssml string `protobuf:"bytes,2,opt,name=ssml,proto3,oneof"`
}
func (*SynthesisInput_Text) isSynthesisInput_InputSource() {}
func (*SynthesisInput_Ssml) isSynthesisInput_InputSource() {}
func (m *SynthesisInput) GetInputSource() isSynthesisInput_InputSource {
if m != nil {
return m.InputSource
}
return nil
}
func (m *SynthesisInput) GetText() string {
if x, ok := m.GetInputSource().(*SynthesisInput_Text); ok {
return x.Text
}
return ""
}
func (m *SynthesisInput) GetSsml() string {
if x, ok := m.GetInputSource().(*SynthesisInput_Ssml); ok {
return x.Ssml
}
return ""
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*SynthesisInput) 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 _SynthesisInput_OneofMarshaler, _SynthesisInput_OneofUnmarshaler, _SynthesisInput_OneofSizer, []interface{}{
(*SynthesisInput_Text)(nil),
(*SynthesisInput_Ssml)(nil),
}
}
func _SynthesisInput_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*SynthesisInput)
// input_source
switch x := m.InputSource.(type) {
case *SynthesisInput_Text:
b.EncodeVarint(1<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Text)
case *SynthesisInput_Ssml:
b.EncodeVarint(2<<3 | proto.WireBytes)
b.EncodeStringBytes(x.Ssml)
case nil:
default:
return fmt.Errorf("SynthesisInput.InputSource has unexpected type %T", x)
}
return nil
}
func _SynthesisInput_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*SynthesisInput)
switch tag {
case 1: // input_source.text
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.InputSource = &SynthesisInput_Text{x}
return true, err
case 2: // input_source.ssml
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
x, err := b.DecodeStringBytes()
m.InputSource = &SynthesisInput_Ssml{x}
return true, err
default:
return false, nil
}
}
func _SynthesisInput_OneofSizer(msg proto.Message) (n int) {
m := msg.(*SynthesisInput)
// input_source
switch x := m.InputSource.(type) {
case *SynthesisInput_Text:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Text)))
n += len(x.Text)
case *SynthesisInput_Ssml:
n += 1 // tag and wire
n += proto.SizeVarint(uint64(len(x.Ssml)))
n += len(x.Ssml)
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// Description of which voice to use for a synthesis request.
type VoiceSelectionParams struct {
// The language (and optionally also the region) of the voice expressed as a
// [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag, e.g.
// "en-US". Required. This should not include a script tag (e.g. use
// "cmn-cn" rather than "cmn-Hant-cn"), because the script will be inferred
// from the input provided in the SynthesisInput. The TTS service
// will use this parameter to help choose an appropriate voice. Note that
// the TTS service may choose a voice with a slightly different language code
// than the one selected; it may substitute a different region
// (e.g. using en-US rather than en-CA if there isn't a Canadian voice
// available), or even a different language, e.g. using "nb" (Norwegian
// Bokmal) instead of "no" (Norwegian)".
LanguageCode string `protobuf:"bytes,1,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
// The name of the voice. Optional; if not set, the service will choose a
// voice based on the other parameters such as language_code and gender.
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// The preferred gender of the voice. Optional; if not set, the service will
// choose a voice based on the other parameters such as language_code and
// name. Note that this is only a preference, not requirement; if a
// voice of the appropriate gender is not available, the synthesizer should
// substitute a voice with a different gender rather than failing the request.
SsmlGender SsmlVoiceGender `protobuf:"varint,3,opt,name=ssml_gender,json=ssmlGender,proto3,enum=google.cloud.texttospeech.v1beta1.SsmlVoiceGender" json:"ssml_gender,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoiceSelectionParams) Reset() { *m = VoiceSelectionParams{} }
func (m *VoiceSelectionParams) String() string { return proto.CompactTextString(m) }
func (*VoiceSelectionParams) ProtoMessage() {}
func (*VoiceSelectionParams) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{5}
}
func (m *VoiceSelectionParams) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoiceSelectionParams.Unmarshal(m, b)
}
func (m *VoiceSelectionParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoiceSelectionParams.Marshal(b, m, deterministic)
}
func (m *VoiceSelectionParams) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoiceSelectionParams.Merge(m, src)
}
func (m *VoiceSelectionParams) XXX_Size() int {
return xxx_messageInfo_VoiceSelectionParams.Size(m)
}
func (m *VoiceSelectionParams) XXX_DiscardUnknown() {
xxx_messageInfo_VoiceSelectionParams.DiscardUnknown(m)
}
var xxx_messageInfo_VoiceSelectionParams proto.InternalMessageInfo
func (m *VoiceSelectionParams) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func (m *VoiceSelectionParams) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *VoiceSelectionParams) GetSsmlGender() SsmlVoiceGender {
if m != nil {
return m.SsmlGender
}
return SsmlVoiceGender_SSML_VOICE_GENDER_UNSPECIFIED
}
// Description of audio data to be synthesized.
type AudioConfig struct {
// Required. The format of the requested audio byte stream.
AudioEncoding AudioEncoding `protobuf:"varint,1,opt,name=audio_encoding,json=audioEncoding,proto3,enum=google.cloud.texttospeech.v1beta1.AudioEncoding" json:"audio_encoding,omitempty"`
// Optional speaking rate/speed, in the range [0.25, 4.0]. 1.0 is the normal
// native speed supported by the specific voice. 2.0 is twice as fast, and
// 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any
// other values < 0.25 or > 4.0 will return an error.
SpeakingRate float64 `protobuf:"fixed64,2,opt,name=speaking_rate,json=speakingRate,proto3" json:"speaking_rate,omitempty"`
// Optional speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20
// semitones from the original pitch. -20 means decrease 20 semitones from the
// original pitch.
Pitch float64 `protobuf:"fixed64,3,opt,name=pitch,proto3" json:"pitch,omitempty"`
// Optional volume gain (in dB) of the normal native volume supported by the
// specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of
// 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB)
// will play at approximately half the amplitude of the normal native signal
// amplitude. A value of +6.0 (dB) will play at approximately twice the
// amplitude of the normal native signal amplitude. Strongly recommend not to
// exceed +10 (dB) as there's usually no effective increase in loudness for
// any value greater than that.
VolumeGainDb float64 `protobuf:"fixed64,4,opt,name=volume_gain_db,json=volumeGainDb,proto3" json:"volume_gain_db,omitempty"`
// The synthesis sample rate (in hertz) for this audio. Optional. If this is
// different from the voice's natural sample rate, then the synthesizer will
// honor this request by converting to the desired sample rate (which might
// result in worse audio quality), unless the specified sample rate is not
// supported for the encoding chosen, in which case it will fail the request
// and return [google.rpc.Code.INVALID_ARGUMENT][].
SampleRateHertz int32 `protobuf:"varint,5,opt,name=sample_rate_hertz,json=sampleRateHertz,proto3" json:"sample_rate_hertz,omitempty"`
// An identifier which selects 'audio effects' profiles that are applied on
// (post synthesized) text to speech.
// Effects are applied on top of each other in the order they are given.
EffectsProfileId []string `protobuf:"bytes,6,rep,name=effects_profile_id,json=effectsProfileId,proto3" json:"effects_profile_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AudioConfig) Reset() { *m = AudioConfig{} }
func (m *AudioConfig) String() string { return proto.CompactTextString(m) }
func (*AudioConfig) ProtoMessage() {}
func (*AudioConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{6}
}
func (m *AudioConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AudioConfig.Unmarshal(m, b)
}
func (m *AudioConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AudioConfig.Marshal(b, m, deterministic)
}
func (m *AudioConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_AudioConfig.Merge(m, src)
}
func (m *AudioConfig) XXX_Size() int {
return xxx_messageInfo_AudioConfig.Size(m)
}
func (m *AudioConfig) XXX_DiscardUnknown() {
xxx_messageInfo_AudioConfig.DiscardUnknown(m)
}
var xxx_messageInfo_AudioConfig proto.InternalMessageInfo
func (m *AudioConfig) GetAudioEncoding() AudioEncoding {
if m != nil {
return m.AudioEncoding
}
return AudioEncoding_AUDIO_ENCODING_UNSPECIFIED
}
func (m *AudioConfig) GetSpeakingRate() float64 {
if m != nil {
return m.SpeakingRate
}
return 0
}
func (m *AudioConfig) GetPitch() float64 {
if m != nil {
return m.Pitch
}
return 0
}
func (m *AudioConfig) GetVolumeGainDb() float64 {
if m != nil {
return m.VolumeGainDb
}
return 0
}
func (m *AudioConfig) GetSampleRateHertz() int32 {
if m != nil {
return m.SampleRateHertz
}
return 0
}
func (m *AudioConfig) GetEffectsProfileId() []string {
if m != nil {
return m.EffectsProfileId
}
return nil
}
// The message returned to the client by the `SynthesizeSpeech` method.
type SynthesizeSpeechResponse struct {
// The audio data bytes encoded as specified in the request, including the
// header (For LINEAR16 audio, we include the WAV header). Note: as
// with all bytes fields, protobuffers use a pure binary representation,
// whereas JSON representations use base64.
AudioContent []byte `protobuf:"bytes,1,opt,name=audio_content,json=audioContent,proto3" json:"audio_content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *SynthesizeSpeechResponse) Reset() { *m = SynthesizeSpeechResponse{} }
func (m *SynthesizeSpeechResponse) String() string { return proto.CompactTextString(m) }
func (*SynthesizeSpeechResponse) ProtoMessage() {}
func (*SynthesizeSpeechResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_dfc2f1f47f5721c8, []int{7}
}
func (m *SynthesizeSpeechResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SynthesizeSpeechResponse.Unmarshal(m, b)
}
func (m *SynthesizeSpeechResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_SynthesizeSpeechResponse.Marshal(b, m, deterministic)
}
func (m *SynthesizeSpeechResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_SynthesizeSpeechResponse.Merge(m, src)
}
func (m *SynthesizeSpeechResponse) XXX_Size() int {
return xxx_messageInfo_SynthesizeSpeechResponse.Size(m)
}
func (m *SynthesizeSpeechResponse) XXX_DiscardUnknown() {
xxx_messageInfo_SynthesizeSpeechResponse.DiscardUnknown(m)
}
var xxx_messageInfo_SynthesizeSpeechResponse proto.InternalMessageInfo
func (m *SynthesizeSpeechResponse) GetAudioContent() []byte {
if m != nil {
return m.AudioContent
}
return nil
}
func init() {
proto.RegisterEnum("google.cloud.texttospeech.v1beta1.SsmlVoiceGender", SsmlVoiceGender_name, SsmlVoiceGender_value)
proto.RegisterEnum("google.cloud.texttospeech.v1beta1.AudioEncoding", AudioEncoding_name, AudioEncoding_value)
proto.RegisterType((*ListVoicesRequest)(nil), "google.cloud.texttospeech.v1beta1.ListVoicesRequest")
proto.RegisterType((*ListVoicesResponse)(nil), "google.cloud.texttospeech.v1beta1.ListVoicesResponse")
proto.RegisterType((*Voice)(nil), "google.cloud.texttospeech.v1beta1.Voice")
proto.RegisterType((*SynthesizeSpeechRequest)(nil), "google.cloud.texttospeech.v1beta1.SynthesizeSpeechRequest")
proto.RegisterType((*SynthesisInput)(nil), "google.cloud.texttospeech.v1beta1.SynthesisInput")
proto.RegisterType((*VoiceSelectionParams)(nil), "google.cloud.texttospeech.v1beta1.VoiceSelectionParams")
proto.RegisterType((*AudioConfig)(nil), "google.cloud.texttospeech.v1beta1.AudioConfig")
proto.RegisterType((*SynthesizeSpeechResponse)(nil), "google.cloud.texttospeech.v1beta1.SynthesizeSpeechResponse")
}
// 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
// TextToSpeechClient is the client API for TextToSpeech service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type TextToSpeechClient interface {
// Returns a list of [Voice][google.cloud.texttospeech.v1beta1.Voice]
// supported for synthesis.
ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error)
}
type textToSpeechClient struct {
cc *grpc.ClientConn
}
func NewTextToSpeechClient(cc *grpc.ClientConn) TextToSpeechClient {
return &textToSpeechClient{cc}
}
func (c *textToSpeechClient) ListVoices(ctx context.Context, in *ListVoicesRequest, opts ...grpc.CallOption) (*ListVoicesResponse, error) {
out := new(ListVoicesResponse)
err := c.cc.Invoke(ctx, "/google.cloud.texttospeech.v1beta1.TextToSpeech/ListVoices", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *textToSpeechClient) SynthesizeSpeech(ctx context.Context, in *SynthesizeSpeechRequest, opts ...grpc.CallOption) (*SynthesizeSpeechResponse, error) {
out := new(SynthesizeSpeechResponse)
err := c.cc.Invoke(ctx, "/google.cloud.texttospeech.v1beta1.TextToSpeech/SynthesizeSpeech", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TextToSpeechServer is the server API for TextToSpeech service.
type TextToSpeechServer interface {
// Returns a list of [Voice][google.cloud.texttospeech.v1beta1.Voice]
// supported for synthesis.
ListVoices(context.Context, *ListVoicesRequest) (*ListVoicesResponse, error)
// Synthesizes speech synchronously: receive results after all text input
// has been processed.
SynthesizeSpeech(context.Context, *SynthesizeSpeechRequest) (*SynthesizeSpeechResponse, error)
}
func RegisterTextToSpeechServer(s *grpc.Server, srv TextToSpeechServer) {
s.RegisterService(&_TextToSpeech_serviceDesc, srv)
}
func _TextToSpeech_ListVoices_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListVoicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TextToSpeechServer).ListVoices(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.texttospeech.v1beta1.TextToSpeech/ListVoices",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TextToSpeechServer).ListVoices(ctx, req.(*ListVoicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TextToSpeech_SynthesizeSpeech_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SynthesizeSpeechRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TextToSpeechServer).SynthesizeSpeech(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.texttospeech.v1beta1.TextToSpeech/SynthesizeSpeech",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TextToSpeechServer).SynthesizeSpeech(ctx, req.(*SynthesizeSpeechRequest))
}
return interceptor(ctx, in, info, handler)
}
var _TextToSpeech_serviceDesc = grpc.ServiceDesc{
ServiceName: "google.cloud.texttospeech.v1beta1.TextToSpeech",
HandlerType: (*TextToSpeechServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListVoices",
Handler: _TextToSpeech_ListVoices_Handler,
},
{
MethodName: "SynthesizeSpeech",
Handler: _TextToSpeech_SynthesizeSpeech_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "google/cloud/texttospeech/v1beta1/cloud_tts.proto",
}
func init() {
proto.RegisterFile("google/cloud/texttospeech/v1beta1/cloud_tts.proto", fileDescriptor_dfc2f1f47f5721c8)
}
var fileDescriptor_dfc2f1f47f5721c8 = []byte{
// 875 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x55, 0xdd, 0x6e, 0x1b, 0x45,
0x14, 0xee, 0xd8, 0x71, 0xda, 0x1e, 0xaf, 0x1d, 0x67, 0x14, 0x51, 0x13, 0x51, 0x94, 0x6e, 0xa8,
0x64, 0x45, 0xc8, 0xc6, 0x2e, 0xbf, 0xe9, 0x05, 0x38, 0xf6, 0xd6, 0xb5, 0xe4, 0x3f, 0x66, 0x93,
0x54, 0xe2, 0x66, 0x35, 0xd9, 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b0, 0x39, 0xcd, 0x5d, 0x4d, 0xf3, 0xa1, 0x5d, 0xbf, 0xa4,
0x99, 0xe1, 0xf7, 0xe5, 0xe5, 0xf7, 0xfb, 0x68, 0xef, 0xe0, 0x07, 0x04, 0x8f, 0x7d, 0x31, 0x7f,
0xf3, 0x39, 0x07, 0x9b, 0xcb, 0xfa, 0xcf, 0xb2, 0xc7, 0x70, 0x86, 0xbe, 0x1a, 0xe7, 0xb8, 0x50,
0x64, 0xb3, 0xa2, 0x29, 0xd2, 0xb0, 0x15, 0x32, 0xae, 0x9f, 0xca, 0x96, 0x49, 0xd1, 0x24, 0x92,
0xff, 0xf2, 0x42, 0x3f, 0x5d, 0x0e, 0xfe, 0x85, 0xd0, 0xc9, 0xba, 0x06, 0x3f, 0xf9, 0x3b, 0x00,
0x00, 0xff, 0xff, 0x26, 0x28, 0xff, 0x42, 0xdd, 0x07, 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

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,268 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1/geometry.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Vertex) Reset() { *m = Vertex{} }
func (m *Vertex) String() string { return proto.CompactTextString(m) }
func (*Vertex) ProtoMessage() {}
func (*Vertex) Descriptor() ([]byte, []int) {
return fileDescriptor_ce1d1cf3c6845cfe, []int{0}
}
func (m *Vertex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Vertex.Unmarshal(m, b)
}
func (m *Vertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Vertex.Marshal(b, m, deterministic)
}
func (m *Vertex) XXX_Merge(src proto.Message) {
xxx_messageInfo_Vertex.Merge(m, src)
}
func (m *Vertex) XXX_Size() int {
return xxx_messageInfo_Vertex.Size(m)
}
func (m *Vertex) XXX_DiscardUnknown() {
xxx_messageInfo_Vertex.DiscardUnknown(m)
}
var xxx_messageInfo_Vertex proto.InternalMessageInfo
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 vertex represents a 2D point in the image.
// NOTE: the normalized vertex coordinates are relative to the original image
// and range from 0 to 1.
type NormalizedVertex struct {
// X coordinate.
X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NormalizedVertex) Reset() { *m = NormalizedVertex{} }
func (m *NormalizedVertex) String() string { return proto.CompactTextString(m) }
func (*NormalizedVertex) ProtoMessage() {}
func (*NormalizedVertex) Descriptor() ([]byte, []int) {
return fileDescriptor_ce1d1cf3c6845cfe, []int{1}
}
func (m *NormalizedVertex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormalizedVertex.Unmarshal(m, b)
}
func (m *NormalizedVertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NormalizedVertex.Marshal(b, m, deterministic)
}
func (m *NormalizedVertex) XXX_Merge(src proto.Message) {
xxx_messageInfo_NormalizedVertex.Merge(m, src)
}
func (m *NormalizedVertex) XXX_Size() int {
return xxx_messageInfo_NormalizedVertex.Size(m)
}
func (m *NormalizedVertex) XXX_DiscardUnknown() {
xxx_messageInfo_NormalizedVertex.DiscardUnknown(m)
}
var xxx_messageInfo_NormalizedVertex proto.InternalMessageInfo
func (m *NormalizedVertex) GetX() float32 {
if m != nil {
return m.X
}
return 0
}
func (m *NormalizedVertex) GetY() float32 {
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,proto3" json:"vertices,omitempty"`
// The bounding polygon normalized vertices.
NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BoundingPoly) Reset() { *m = BoundingPoly{} }
func (m *BoundingPoly) String() string { return proto.CompactTextString(m) }
func (*BoundingPoly) ProtoMessage() {}
func (*BoundingPoly) Descriptor() ([]byte, []int) {
return fileDescriptor_ce1d1cf3c6845cfe, []int{2}
}
func (m *BoundingPoly) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BoundingPoly.Unmarshal(m, b)
}
func (m *BoundingPoly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BoundingPoly.Marshal(b, m, deterministic)
}
func (m *BoundingPoly) XXX_Merge(src proto.Message) {
xxx_messageInfo_BoundingPoly.Merge(m, src)
}
func (m *BoundingPoly) XXX_Size() int {
return xxx_messageInfo_BoundingPoly.Size(m)
}
func (m *BoundingPoly) XXX_DiscardUnknown() {
xxx_messageInfo_BoundingPoly.DiscardUnknown(m)
}
var xxx_messageInfo_BoundingPoly proto.InternalMessageInfo
func (m *BoundingPoly) GetVertices() []*Vertex {
if m != nil {
return m.Vertices
}
return nil
}
func (m *BoundingPoly) GetNormalizedVertices() []*NormalizedVertex {
if m != nil {
return m.NormalizedVertices
}
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
// Z coordinate (or depth).
Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Position) Reset() { *m = Position{} }
func (m *Position) String() string { return proto.CompactTextString(m) }
func (*Position) ProtoMessage() {}
func (*Position) Descriptor() ([]byte, []int) {
return fileDescriptor_ce1d1cf3c6845cfe, []int{3}
}
func (m *Position) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Position.Unmarshal(m, b)
}
func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Position.Marshal(b, m, deterministic)
}
func (m *Position) XXX_Merge(src proto.Message) {
xxx_messageInfo_Position.Merge(m, src)
}
func (m *Position) XXX_Size() int {
return xxx_messageInfo_Position.Size(m)
}
func (m *Position) XXX_DiscardUnknown() {
xxx_messageInfo_Position.DiscardUnknown(m)
}
var xxx_messageInfo_Position proto.InternalMessageInfo
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((*NormalizedVertex)(nil), "google.cloud.vision.v1.NormalizedVertex")
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", fileDescriptor_ce1d1cf3c6845cfe)
}
var fileDescriptor_ce1d1cf3c6845cfe = []byte{
// 285 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0x41, 0x4b, 0xc3, 0x30,
0x14, 0xc7, 0x49, 0xa7, 0x63, 0xc4, 0x09, 0x52, 0x41, 0x8a, 0x07, 0x19, 0x45, 0xa1, 0xa7, 0x84,
0xa9, 0x27, 0xf5, 0x54, 0x0f, 0xbb, 0x8d, 0xd2, 0xc3, 0x40, 0x2f, 0x52, 0xdb, 0x10, 0x02, 0x69,
0xde, 0x48, 0xd3, 0xb2, 0xf6, 0xe3, 0x08, 0x7e, 0x47, 0x8f, 0xd2, 0x64, 0x14, 0x56, 0x9c, 0xb7,
0xfe, 0x9b, 0x5f, 0x7e, 0xef, 0xe5, 0x3d, 0x7c, 0xc7, 0x01, 0xb8, 0x64, 0x34, 0x97, 0x50, 0x17,
0xb4, 0x11, 0x95, 0x00, 0x45, 0x9b, 0x25, 0xe5, 0x0c, 0x4a, 0x66, 0x74, 0x4b, 0xb6, 0x1a, 0x0c,
0xf8, 0x57, 0x0e, 0x23, 0x16, 0x23, 0x0e, 0x23, 0xcd, 0x32, 0xbc, 0xc5, 0xd3, 0x0d, 0xd3, 0x86,
0xed, 0xfc, 0x39, 0x46, 0xbb, 0x00, 0x2d, 0x50, 0x74, 0x9a, 0x22, 0x9b, 0xda, 0xc0, 0x73, 0xa9,
0x0d, 0x09, 0xbe, 0x58, 0x83, 0x2e, 0x33, 0x29, 0x3a, 0x56, 0x8c, 0x79, 0xef, 0x80, 0xf7, 0x7a,
0xfe, 0x1b, 0xe1, 0x79, 0x0c, 0xb5, 0x2a, 0x84, 0xe2, 0x09, 0xc8, 0xd6, 0x7f, 0xc2, 0xb3, 0x86,
0x69, 0x23, 0x72, 0x56, 0x05, 0x68, 0x31, 0x89, 0xce, 0xee, 0x6f, 0xc8, 0xdf, 0x1d, 0x11, 0xa7,
0x4f, 0x07, 0xde, 0x7f, 0xc3, 0x97, 0x6a, 0x28, 0xfe, 0x31, 0x68, 0x3c, 0xab, 0x89, 0x8e, 0x69,
0xc6, 0xfd, 0xa6, 0xbe, 0x3a, 0xf8, 0xd3, 0x3b, 0xc2, 0x47, 0x3c, 0x4b, 0xa0, 0x12, 0x46, 0x80,
0xfa, 0xef, 0x3d, 0x7d, 0xea, 0x82, 0x89, 0x4b, 0x5d, 0x5c, 0xe3, 0xeb, 0x1c, 0xca, 0x23, 0x85,
0xe3, 0xf3, 0xd5, 0x7e, 0xf2, 0x49, 0x3f, 0xf8, 0x04, 0xbd, 0xbf, 0xec, 0x41, 0x0e, 0x32, 0x53,
0x9c, 0x80, 0xe6, 0x94, 0x33, 0x65, 0xd7, 0x42, 0xdd, 0x51, 0xb6, 0x15, 0xd5, 0x78, 0x81, 0xcf,
0xee, 0xeb, 0x07, 0xa1, 0x2f, 0xef, 0x64, 0xf5, 0xba, 0x59, 0x7f, 0x4e, 0xed, 0x95, 0x87, 0xdf,
0x00, 0x00, 0x00, 0xff, 0xff, 0xf1, 0x3c, 0x20, 0x46, 0xf2, 0x01, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,812 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1/text_annotation.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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 not co-occur with
// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
// 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 fileDescriptor_9caabbd9b4627d68, []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 fileDescriptor_9caabbd9b4627d68, []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 [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,proto3" json:"pages,omitempty"`
// UTF-8 text detected on the pages.
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextAnnotation) Reset() { *m = TextAnnotation{} }
func (m *TextAnnotation) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation) ProtoMessage() {}
func (*TextAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{0}
}
func (m *TextAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation.Unmarshal(m, b)
}
func (m *TextAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation.Marshal(b, m, deterministic)
}
func (m *TextAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation.Merge(m, src)
}
func (m *TextAnnotation) XXX_Size() int {
return xxx_messageInfo_TextAnnotation.Size(m)
}
func (m *TextAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation proto.InternalMessageInfo
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,proto3" json:"language_code,omitempty"`
// Confidence of detected language. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_9caabbd9b4627d68, []int{0, 0}
}
func (m *TextAnnotation_DetectedLanguage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedLanguage.Merge(m, src)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Size(m)
}
func (m *TextAnnotation_DetectedLanguage) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedLanguage.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedLanguage proto.InternalMessageInfo
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 {
// Detected break type.
Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,proto3,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,proto3" json:"is_prefix,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_9caabbd9b4627d68, []int{0, 1}
}
func (m *TextAnnotation_DetectedBreak) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedBreak) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedBreak) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedBreak.Merge(m, src)
}
func (m *TextAnnotation_DetectedBreak) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Size(m)
}
func (m *TextAnnotation_DetectedBreak) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedBreak.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedBreak proto.InternalMessageInfo
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,proto3" json:"detected_languages,omitempty"`
// Detected start or end of a text segment.
DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_9caabbd9b4627d68, []int{0, 2}
}
func (m *TextAnnotation_TextProperty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_TextProperty.Unmarshal(m, b)
}
func (m *TextAnnotation_TextProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_TextProperty.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_TextProperty) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_TextProperty.Merge(m, src)
}
func (m *TextAnnotation_TextProperty) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_TextProperty.Size(m)
}
func (m *TextAnnotation_TextProperty) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_TextProperty.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_TextProperty proto.InternalMessageInfo
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,proto3" json:"property,omitempty"`
// Page width. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
// Page height. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
// List of blocks of text, images etc on this page.
Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"`
// Confidence of the OCR results on the page. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Page) Reset() { *m = Page{} }
func (m *Page) String() string { return proto.CompactTextString(m) }
func (*Page) ProtoMessage() {}
func (*Page) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{1}
}
func (m *Page) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Page.Unmarshal(m, b)
}
func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Page.Marshal(b, m, deterministic)
}
func (m *Page) XXX_Merge(src proto.Message) {
xxx_messageInfo_Page.Merge(m, src)
}
func (m *Page) XXX_Size() int {
return xxx_messageInfo_Page.Size(m)
}
func (m *Page) XXX_DiscardUnknown() {
xxx_messageInfo_Page.DiscardUnknown(m)
}
var xxx_messageInfo_Page proto.InternalMessageInfo
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
}
func (m *Page) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// Logical element on the page.
type Block struct {
// Additional information detected for the block.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"paragraphs,omitempty"`
// Detected block type (text, image etc) for this block.
BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=google.cloud.vision.v1.Block_BlockType" json:"block_type,omitempty"`
// Confidence of the OCR results on the block. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{2}
}
func (m *Block) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Block.Unmarshal(m, b)
}
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
}
func (m *Block) XXX_Merge(src proto.Message) {
xxx_messageInfo_Block.Merge(m, src)
}
func (m *Block) XXX_Size() int {
return xxx_messageInfo_Block.Size(m)
}
func (m *Block) XXX_DiscardUnknown() {
xxx_messageInfo_Block.DiscardUnknown(m)
}
var xxx_messageInfo_Block proto.InternalMessageInfo
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
}
func (m *Block) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// 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,proto3" 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,proto3" json:"bounding_box,omitempty"`
// List of words in this paragraph.
Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
// Confidence of the OCR results for the paragraph. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Paragraph) Reset() { *m = Paragraph{} }
func (m *Paragraph) String() string { return proto.CompactTextString(m) }
func (*Paragraph) ProtoMessage() {}
func (*Paragraph) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{3}
}
func (m *Paragraph) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Paragraph.Unmarshal(m, b)
}
func (m *Paragraph) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Paragraph.Marshal(b, m, deterministic)
}
func (m *Paragraph) XXX_Merge(src proto.Message) {
xxx_messageInfo_Paragraph.Merge(m, src)
}
func (m *Paragraph) XXX_Size() int {
return xxx_messageInfo_Paragraph.Size(m)
}
func (m *Paragraph) XXX_DiscardUnknown() {
xxx_messageInfo_Paragraph.DiscardUnknown(m)
}
var xxx_messageInfo_Paragraph proto.InternalMessageInfo
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
}
func (m *Paragraph) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A word representation.
type Word struct {
// Additional information detected for the word.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"symbols,omitempty"`
// Confidence of the OCR results for the word. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Word) Reset() { *m = Word{} }
func (m *Word) String() string { return proto.CompactTextString(m) }
func (*Word) ProtoMessage() {}
func (*Word) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{4}
}
func (m *Word) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Word.Unmarshal(m, b)
}
func (m *Word) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Word.Marshal(b, m, deterministic)
}
func (m *Word) XXX_Merge(src proto.Message) {
xxx_messageInfo_Word.Merge(m, src)
}
func (m *Word) XXX_Size() int {
return xxx_messageInfo_Word.Size(m)
}
func (m *Word) XXX_DiscardUnknown() {
xxx_messageInfo_Word.DiscardUnknown(m)
}
var xxx_messageInfo_Word proto.InternalMessageInfo
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
}
func (m *Word) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A single symbol representation.
type Symbol struct {
// Additional information detected for the symbol.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" json:"bounding_box,omitempty"`
// The actual UTF-8 representation of the symbol.
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
// Confidence of the OCR results for the symbol. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Symbol) Reset() { *m = Symbol{} }
func (m *Symbol) String() string { return proto.CompactTextString(m) }
func (*Symbol) ProtoMessage() {}
func (*Symbol) Descriptor() ([]byte, []int) {
return fileDescriptor_9caabbd9b4627d68, []int{5}
}
func (m *Symbol) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Symbol.Unmarshal(m, b)
}
func (m *Symbol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Symbol.Marshal(b, m, deterministic)
}
func (m *Symbol) XXX_Merge(src proto.Message) {
xxx_messageInfo_Symbol.Merge(m, src)
}
func (m *Symbol) XXX_Size() int {
return xxx_messageInfo_Symbol.Size(m)
}
func (m *Symbol) XXX_DiscardUnknown() {
xxx_messageInfo_Symbol.DiscardUnknown(m)
}
var xxx_messageInfo_Symbol proto.InternalMessageInfo
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 (m *Symbol) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
func init() {
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)
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")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1/text_annotation.proto", fileDescriptor_9caabbd9b4627d68)
}
var fileDescriptor_9caabbd9b4627d68 = []byte{
// 774 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x56, 0xcf, 0x6f, 0xd3, 0x58,
0x10, 0x5e, 0x27, 0x76, 0x1a, 0x4f, 0xda, 0xc8, 0xfb, 0x76, 0x55, 0x45, 0xd9, 0x6e, 0xd5, 0xcd,
0x82, 0xe8, 0x01, 0x39, 0x6a, 0x0a, 0x02, 0x09, 0x84, 0x14, 0xa7, 0xa6, 0xad, 0x1a, 0x25, 0xd6,
0x6b, 0x42, 0xf9, 0x71, 0xb0, 0x1c, 0xfb, 0xd5, 0xb1, 0x9a, 0xfa, 0x59, 0xb6, 0xdb, 0x26, 0xe2,
0x9f, 0x41, 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71, 0xab,
0xbb, 0xa3, 0x4a, 0x42, 0xed, 0x13, 0x07, 0xe2, 0x54, 0xd5, 0x35, 0x1e, 0x53, 0x03, 0x84, 0x0b,
0xea, 0x5b, 0xe9, 0x84, 0x32, 0xff, 0x88, 0x8f, 0xa8, 0x6f, 0xe1, 0x18, 0xba, 0xd0, 0x4f, 0xfe,
0xab, 0x7e, 0x7e, 0xe6, 0x80, 0x8f, 0xf0, 0xd7, 0x58, 0xf6, 0x7d, 0x58, 0x0a, 0x26, 0xa7, 0x03,
0x3a, 0x4a, 0x85, 0xaf, 0x67, 0x71, 0x1c, 0x32, 0x18, 0x4e, 0xe1, 0x57, 0x8a, 0x7f, 0xcb, 0x41,
0x21, 0x8e, 0xb9, 0xc6, 0xf2, 0xd3, 0xab, 0x34, 0x7f, 0x79, 0x95, 0x5e, 0x25, 0x4c, 0x79, 0x09,
0x55, 0x93, 0x9e, 0x66, 0xe4, 0x52, 0xfe, 0x9a, 0x57, 0xa0, 0x45, 0x17, 0xbf, 0xc6, 0x3d, 0x7f,
0x98, 0xc0, 0x6d, 0x1a, 0xdd, 0x25, 0x32, 0xf5, 0xed, 0xba, 0x4d, 0x5c, 0xf6, 0x59, 0x50, 0x8f,
0x7f, 0x32, 0x3c, 0x27, 0x58, 0xfc, 0x80, 0x78, 0x10, 0x9f, 0x3e, 0x72, 0xdc, 0xeb, 0x1c, 0xbf,
0xdb, 0x7a, 0xd2, 0x19, 0x14, 0x58, 0xc8, 0xf6, 0x97, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc4, 0x88,
0x57, 0x38, 0xd6, 0x08, 0x00, 0x00,
}

View file

@ -0,0 +1,402 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1/web_detection.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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,proto3" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages,proto3" 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,proto3" 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,proto3" json:"pages_with_matching_images,omitempty"`
// The visually similar image results.
VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages,proto3" json:"visually_similar_images,omitempty"`
// Best guess text labels for the request image.
BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels,proto3" json:"best_guess_labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection) Reset() { *m = WebDetection{} }
func (m *WebDetection) String() string { return proto.CompactTextString(m) }
func (*WebDetection) ProtoMessage() {}
func (*WebDetection) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0}
}
func (m *WebDetection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection.Unmarshal(m, b)
}
func (m *WebDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection.Marshal(b, m, deterministic)
}
func (m *WebDetection) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection.Merge(m, src)
}
func (m *WebDetection) XXX_Size() int {
return xxx_messageInfo_WebDetection.Size(m)
}
func (m *WebDetection) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection proto.InternalMessageInfo
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
}
func (m *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImage {
if m != nil {
return m.VisuallySimilarImages
}
return nil
}
func (m *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabel {
if m != nil {
return m.BestGuessLabels
}
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,proto3" 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,proto3" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_894df371610d13f4, []int{0, 0}
}
func (m *WebDetection_WebEntity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebEntity.Unmarshal(m, b)
}
func (m *WebDetection_WebEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebEntity.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebEntity) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebEntity.Merge(m, src)
}
func (m *WebDetection_WebEntity) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebEntity.Size(m)
}
func (m *WebDetection_WebEntity) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebEntity.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebEntity proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the image.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_894df371610d13f4, []int{0, 1}
}
func (m *WebDetection_WebImage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebImage.Unmarshal(m, b)
}
func (m *WebDetection_WebImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebImage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebImage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebImage.Merge(m, src)
}
func (m *WebDetection_WebImage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebImage.Size(m)
}
func (m *WebDetection_WebImage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebImage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebImage proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the web page.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Title for the web page, may contain HTML markups.
PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle,proto3" json:"page_title,omitempty"`
// Fully matching images on the page.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images on the page.
// 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,5,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_894df371610d13f4, []int{0, 2}
}
func (m *WebDetection_WebPage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebPage.Unmarshal(m, b)
}
func (m *WebDetection_WebPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebPage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebPage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebPage.Merge(m, src)
}
func (m *WebDetection_WebPage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebPage.Size(m)
}
func (m *WebDetection_WebPage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebPage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebPage proto.InternalMessageInfo
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 (m *WebDetection_WebPage) GetPageTitle() string {
if m != nil {
return m.PageTitle
}
return ""
}
func (m *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
// Label to provide extra metadata for the web detection.
type WebDetection_WebLabel struct {
// Label for extra metadata.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebLabel) Reset() { *m = WebDetection_WebLabel{} }
func (m *WebDetection_WebLabel) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebLabel) ProtoMessage() {}
func (*WebDetection_WebLabel) Descriptor() ([]byte, []int) {
return fileDescriptor_894df371610d13f4, []int{0, 3}
}
func (m *WebDetection_WebLabel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebLabel.Unmarshal(m, b)
}
func (m *WebDetection_WebLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebLabel.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebLabel) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebLabel.Merge(m, src)
}
func (m *WebDetection_WebLabel) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebLabel.Size(m)
}
func (m *WebDetection_WebLabel) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebLabel.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebLabel proto.InternalMessageInfo
func (m *WebDetection_WebLabel) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *WebDetection_WebLabel) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
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")
proto.RegisterType((*WebDetection_WebLabel)(nil), "google.cloud.vision.v1.WebDetection.WebLabel")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1/web_detection.proto", fileDescriptor_894df371610d13f4)
}
var fileDescriptor_894df371610d13f4 = []byte{
// 512 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x51, 0x6f, 0xd3, 0x30,
0x10, 0xc7, 0x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x60, 0xa4, 0xf0, 0x07, 0xe9, 0x61, 0xe5, 0x23, 0x16, 0xae, 0xdd, 0xee,
0xce, 0x7f, 0xd8, 0xee, 0x9d, 0x7f, 0xb7, 0xdd, 0xd1, 0xa9, 0x1d, 0xa7, 0xfd, 0x7b, 0x38, 0x08,
0xbb, 0x0c, 0x7e, 0x38, 0x2e, 0xa1, 0x4f, 0xc8, 0x6d, 0xc9, 0xcb, 0xa2, 0xc1, 0x61, 0x64, 0x2a,
0x77, 0x63, 0xea, 0xa5, 0x83, 0x55, 0xf1, 0x44, 0xe5, 0xe2, 0x78, 0x49, 0xa2, 0x4c, 0xcd, 0xae,
0x39, 0xd1, 0xf1, 0xde, 0xfa, 0x91, 0xc6, 0xf8, 0x02, 0x8d, 0x83, 0x2f, 0xaf, 0x7c, 0x73, 0xa1,
0x90, 0x14, 0xab, 0xba, 0x48, 0x0a, 0x51, 0xda, 0xf7, 0x29, 0x71, 0x9f, 0x78, 0x05, 0xfa, 0xf2,
0x23, 0xf8, 0xd2, 0x45, 0xbf, 0x82, 0xe0, 0x47, 0xab, 0x73, 0x76, 0xf2, 0xe9, 0xdd, 0x64, 0xd7,
0x4a, 0x5e, 0xfc, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x99, 0x1b, 0x06, 0x03, 0x36, 0x05, 0x00, 0x00,
}

View file

@ -0,0 +1,204 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p1beta1/geometry.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Vertex) Reset() { *m = Vertex{} }
func (m *Vertex) String() string { return proto.CompactTextString(m) }
func (*Vertex) ProtoMessage() {}
func (*Vertex) Descriptor() ([]byte, []int) {
return fileDescriptor_a110c700536b1e95, []int{0}
}
func (m *Vertex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Vertex.Unmarshal(m, b)
}
func (m *Vertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Vertex.Marshal(b, m, deterministic)
}
func (m *Vertex) XXX_Merge(src proto.Message) {
xxx_messageInfo_Vertex.Merge(m, src)
}
func (m *Vertex) XXX_Size() int {
return xxx_messageInfo_Vertex.Size(m)
}
func (m *Vertex) XXX_DiscardUnknown() {
xxx_messageInfo_Vertex.DiscardUnknown(m)
}
var xxx_messageInfo_Vertex proto.InternalMessageInfo
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,proto3" json:"vertices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BoundingPoly) Reset() { *m = BoundingPoly{} }
func (m *BoundingPoly) String() string { return proto.CompactTextString(m) }
func (*BoundingPoly) ProtoMessage() {}
func (*BoundingPoly) Descriptor() ([]byte, []int) {
return fileDescriptor_a110c700536b1e95, []int{1}
}
func (m *BoundingPoly) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BoundingPoly.Unmarshal(m, b)
}
func (m *BoundingPoly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BoundingPoly.Marshal(b, m, deterministic)
}
func (m *BoundingPoly) XXX_Merge(src proto.Message) {
xxx_messageInfo_BoundingPoly.Merge(m, src)
}
func (m *BoundingPoly) XXX_Size() int {
return xxx_messageInfo_BoundingPoly.Size(m)
}
func (m *BoundingPoly) XXX_DiscardUnknown() {
xxx_messageInfo_BoundingPoly.DiscardUnknown(m)
}
var xxx_messageInfo_BoundingPoly proto.InternalMessageInfo
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
// Z coordinate (or depth).
Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Position) Reset() { *m = Position{} }
func (m *Position) String() string { return proto.CompactTextString(m) }
func (*Position) ProtoMessage() {}
func (*Position) Descriptor() ([]byte, []int) {
return fileDescriptor_a110c700536b1e95, []int{2}
}
func (m *Position) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Position.Unmarshal(m, b)
}
func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Position.Marshal(b, m, deterministic)
}
func (m *Position) XXX_Merge(src proto.Message) {
xxx_messageInfo_Position.Merge(m, src)
}
func (m *Position) XXX_Size() int {
return xxx_messageInfo_Position.Size(m)
}
func (m *Position) XXX_DiscardUnknown() {
xxx_messageInfo_Position.DiscardUnknown(m)
}
var xxx_messageInfo_Position proto.InternalMessageInfo
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.v1p1beta1.Vertex")
proto.RegisterType((*BoundingPoly)(nil), "google.cloud.vision.v1p1beta1.BoundingPoly")
proto.RegisterType((*Position)(nil), "google.cloud.vision.v1p1beta1.Position")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p1beta1/geometry.proto", fileDescriptor_a110c700536b1e95)
}
var fileDescriptor_a110c700536b1e95 = []byte{
// 243 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x90, 0xb1, 0x4b, 0xc3, 0x40,
0x14, 0x87, 0x79, 0x29, 0x96, 0x72, 0xd6, 0x25, 0x53, 0x16, 0xa1, 0x06, 0x85, 0x0e, 0x72, 0x47,
0xd4, 0xcd, 0xc9, 0x38, 0xb8, 0xc6, 0x0c, 0x0e, 0x6e, 0x69, 0xfa, 0x78, 0x1c, 0xa4, 0xf7, 0xc2,
0xe5, 0x1a, 0x7a, 0xc5, 0x3f, 0xdc, 0x51, 0x7a, 0x57, 0x2a, 0x0e, 0x76, 0xfc, 0xdd, 0x7d, 0x8f,
0x0f, 0x3e, 0x71, 0x4f, 0xcc, 0xd4, 0xa1, 0x6a, 0x3b, 0xde, 0xae, 0xd5, 0xa8, 0x07, 0xcd, 0x46,
0x8d, 0x45, 0x5f, 0xac, 0xd0, 0x35, 0x85, 0x22, 0xe4, 0x0d, 0x3a, 0xeb, 0x65, 0x6f, 0xd9, 0x71,
0x7a, 0x1d, 0x69, 0x19, 0x68, 0x19, 0x69, 0x79, 0xa2, 0xf3, 0x5b, 0x31, 0xfd, 0x40, 0xeb, 0x70,
0x97, 0xce, 0x05, 0xec, 0x32, 0x58, 0xc0, 0xf2, 0xa2, 0x86, 0xb0, 0x7c, 0x96, 0xc4, 0xe5, 0xf3,
0x77, 0x31, 0x2f, 0x79, 0x6b, 0xd6, 0xda, 0x50, 0xc5, 0x9d, 0x4f, 0x5f, 0xc4, 0x6c, 0x44, 0xeb,
0x74, 0x8b, 0x43, 0x06, 0x8b, 0xc9, 0xf2, 0xf2, 0xe1, 0x4e, 0x9e, 0xf5, 0xc8, 0x28, 0xa9, 0x4f,
0x67, 0xf9, 0x93, 0x98, 0x55, 0x3c, 0x68, 0xa7, 0xd9, 0xfc, 0xaa, 0x93, 0x3f, 0xea, 0xa4, 0x06,
0x7f, 0x58, 0xfb, 0x6c, 0x12, 0xd7, 0xbe, 0xfc, 0x12, 0x37, 0x2d, 0x6f, 0xce, 0xbb, 0xca, 0xab,
0xb7, 0x63, 0x82, 0xea, 0x50, 0xa0, 0x82, 0xcf, 0xd7, 0x23, 0x4f, 0xdc, 0x35, 0x86, 0x24, 0x5b,
0x52, 0x84, 0x26, 0xf4, 0x51, 0xf1, 0xab, 0xe9, 0xf5, 0xf0, 0x4f, 0xd0, 0xe7, 0xf8, 0xf0, 0x0d,
0xb0, 0x9a, 0x86, 0x93, 0xc7, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x91, 0xa5, 0x86, 0xce, 0x82,
0x01, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,806 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p1beta1/text_annotation.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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 not co-occur with
// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
// 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 fileDescriptor_74ab7e2078bf72c5, []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 fileDescriptor_74ab7e2078bf72c5, []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
// [TextAnnotation.TextProperty][google.cloud.vision.v1p1beta1.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,proto3" json:"pages,omitempty"`
// UTF-8 text detected on the pages.
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextAnnotation) Reset() { *m = TextAnnotation{} }
func (m *TextAnnotation) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation) ProtoMessage() {}
func (*TextAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{0}
}
func (m *TextAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation.Unmarshal(m, b)
}
func (m *TextAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation.Marshal(b, m, deterministic)
}
func (m *TextAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation.Merge(m, src)
}
func (m *TextAnnotation) XXX_Size() int {
return xxx_messageInfo_TextAnnotation.Size(m)
}
func (m *TextAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation proto.InternalMessageInfo
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,proto3" json:"language_code,omitempty"`
// Confidence of detected language. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_74ab7e2078bf72c5, []int{0, 0}
}
func (m *TextAnnotation_DetectedLanguage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedLanguage.Merge(m, src)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Size(m)
}
func (m *TextAnnotation_DetectedLanguage) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedLanguage.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedLanguage proto.InternalMessageInfo
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 {
// Detected break type.
Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.vision.v1p1beta1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
// True if break prepends the element.
IsPrefix bool `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix,proto3" json:"is_prefix,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_74ab7e2078bf72c5, []int{0, 1}
}
func (m *TextAnnotation_DetectedBreak) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedBreak) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedBreak) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedBreak.Merge(m, src)
}
func (m *TextAnnotation_DetectedBreak) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Size(m)
}
func (m *TextAnnotation_DetectedBreak) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedBreak.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedBreak proto.InternalMessageInfo
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,proto3" json:"detected_languages,omitempty"`
// Detected start or end of a text segment.
DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_74ab7e2078bf72c5, []int{0, 2}
}
func (m *TextAnnotation_TextProperty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_TextProperty.Unmarshal(m, b)
}
func (m *TextAnnotation_TextProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_TextProperty.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_TextProperty) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_TextProperty.Merge(m, src)
}
func (m *TextAnnotation_TextProperty) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_TextProperty.Size(m)
}
func (m *TextAnnotation_TextProperty) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_TextProperty.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_TextProperty proto.InternalMessageInfo
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,proto3" json:"property,omitempty"`
// Page width in pixels.
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
// Page height in pixels.
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
// List of blocks of text, images etc on this page.
Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"`
// Confidence of the OCR results on the page. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Page) Reset() { *m = Page{} }
func (m *Page) String() string { return proto.CompactTextString(m) }
func (*Page) ProtoMessage() {}
func (*Page) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{1}
}
func (m *Page) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Page.Unmarshal(m, b)
}
func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Page.Marshal(b, m, deterministic)
}
func (m *Page) XXX_Merge(src proto.Message) {
xxx_messageInfo_Page.Merge(m, src)
}
func (m *Page) XXX_Size() int {
return xxx_messageInfo_Page.Size(m)
}
func (m *Page) XXX_DiscardUnknown() {
xxx_messageInfo_Page.DiscardUnknown(m)
}
var xxx_messageInfo_Page proto.InternalMessageInfo
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
}
func (m *Page) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// Logical element on the page.
type Block struct {
// Additional information detected for the block.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"paragraphs,omitempty"`
// Detected block type (text, image etc) for this block.
BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=google.cloud.vision.v1p1beta1.Block_BlockType" json:"block_type,omitempty"`
// Confidence of the OCR results on the block. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{2}
}
func (m *Block) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Block.Unmarshal(m, b)
}
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
}
func (m *Block) XXX_Merge(src proto.Message) {
xxx_messageInfo_Block.Merge(m, src)
}
func (m *Block) XXX_Size() int {
return xxx_messageInfo_Block.Size(m)
}
func (m *Block) XXX_DiscardUnknown() {
xxx_messageInfo_Block.DiscardUnknown(m)
}
var xxx_messageInfo_Block proto.InternalMessageInfo
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
}
func (m *Block) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// 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,proto3" 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,proto3" json:"bounding_box,omitempty"`
// List of words in this paragraph.
Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
// Confidence of the OCR results for the paragraph. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Paragraph) Reset() { *m = Paragraph{} }
func (m *Paragraph) String() string { return proto.CompactTextString(m) }
func (*Paragraph) ProtoMessage() {}
func (*Paragraph) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{3}
}
func (m *Paragraph) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Paragraph.Unmarshal(m, b)
}
func (m *Paragraph) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Paragraph.Marshal(b, m, deterministic)
}
func (m *Paragraph) XXX_Merge(src proto.Message) {
xxx_messageInfo_Paragraph.Merge(m, src)
}
func (m *Paragraph) XXX_Size() int {
return xxx_messageInfo_Paragraph.Size(m)
}
func (m *Paragraph) XXX_DiscardUnknown() {
xxx_messageInfo_Paragraph.DiscardUnknown(m)
}
var xxx_messageInfo_Paragraph proto.InternalMessageInfo
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
}
func (m *Paragraph) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A word representation.
type Word struct {
// Additional information detected for the word.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"symbols,omitempty"`
// Confidence of the OCR results for the word. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Word) Reset() { *m = Word{} }
func (m *Word) String() string { return proto.CompactTextString(m) }
func (*Word) ProtoMessage() {}
func (*Word) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{4}
}
func (m *Word) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Word.Unmarshal(m, b)
}
func (m *Word) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Word.Marshal(b, m, deterministic)
}
func (m *Word) XXX_Merge(src proto.Message) {
xxx_messageInfo_Word.Merge(m, src)
}
func (m *Word) XXX_Size() int {
return xxx_messageInfo_Word.Size(m)
}
func (m *Word) XXX_DiscardUnknown() {
xxx_messageInfo_Word.DiscardUnknown(m)
}
var xxx_messageInfo_Word proto.InternalMessageInfo
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
}
func (m *Word) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A single symbol representation.
type Symbol struct {
// Additional information detected for the symbol.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" json:"bounding_box,omitempty"`
// The actual UTF-8 representation of the symbol.
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
// Confidence of the OCR results for the symbol. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Symbol) Reset() { *m = Symbol{} }
func (m *Symbol) String() string { return proto.CompactTextString(m) }
func (*Symbol) ProtoMessage() {}
func (*Symbol) Descriptor() ([]byte, []int) {
return fileDescriptor_74ab7e2078bf72c5, []int{5}
}
func (m *Symbol) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Symbol.Unmarshal(m, b)
}
func (m *Symbol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Symbol.Marshal(b, m, deterministic)
}
func (m *Symbol) XXX_Merge(src proto.Message) {
xxx_messageInfo_Symbol.Merge(m, src)
}
func (m *Symbol) XXX_Size() int {
return xxx_messageInfo_Symbol.Size(m)
}
func (m *Symbol) XXX_DiscardUnknown() {
xxx_messageInfo_Symbol.DiscardUnknown(m)
}
var xxx_messageInfo_Symbol proto.InternalMessageInfo
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 (m *Symbol) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
func init() {
proto.RegisterEnum("google.cloud.vision.v1p1beta1.TextAnnotation_DetectedBreak_BreakType", TextAnnotation_DetectedBreak_BreakType_name, TextAnnotation_DetectedBreak_BreakType_value)
proto.RegisterEnum("google.cloud.vision.v1p1beta1.Block_BlockType", Block_BlockType_name, Block_BlockType_value)
proto.RegisterType((*TextAnnotation)(nil), "google.cloud.vision.v1p1beta1.TextAnnotation")
proto.RegisterType((*TextAnnotation_DetectedLanguage)(nil), "google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage")
proto.RegisterType((*TextAnnotation_DetectedBreak)(nil), "google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak")
proto.RegisterType((*TextAnnotation_TextProperty)(nil), "google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty")
proto.RegisterType((*Page)(nil), "google.cloud.vision.v1p1beta1.Page")
proto.RegisterType((*Block)(nil), "google.cloud.vision.v1p1beta1.Block")
proto.RegisterType((*Paragraph)(nil), "google.cloud.vision.v1p1beta1.Paragraph")
proto.RegisterType((*Word)(nil), "google.cloud.vision.v1p1beta1.Word")
proto.RegisterType((*Symbol)(nil), "google.cloud.vision.v1p1beta1.Symbol")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p1beta1/text_annotation.proto", fileDescriptor_74ab7e2078bf72c5)
}
var fileDescriptor_74ab7e2078bf72c5 = []byte{
// 775 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xd3, 0x48,
0x14, 0x5f, 0x27, 0x76, 0x1a, 0xbf, 0xb4, 0x91, 0x77, 0x76, 0xb5, 0x8a, 0xb2, 0xbb, 0xa8, 0xa4,
0x20, 0x55, 0x02, 0x39, 0x6a, 0x7a, 0x2a, 0x45, 0xa0, 0x38, 0xb5, 0xd4, 0xaa, 0x21, 0xb5, 0xa6,
0x09, 0xa5, 0x5c, 0x2c, 0xff, 0x99, 0x3a, 0x56, 0x13, 0x8f, 0x65, 0xbb, 0x6d, 0x72, 0xe5, 0x8a,
0x04, 0x5f, 0x88, 0x2f, 0x83, 0xc4, 0x09, 0xf1, 0x01, 0x38, 0x22, 0x8f, 0x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 0x34, 0xde, 0x14, 0x40, 0x9c, 0x91,
0xbb, 0x35, 0x2d, 0xdc, 0x01, 0xe1, 0x8a, 0x06, 0x76, 0xd6, 0xbd, 0xbc, 0x8f, 0xfb, 0x09, 0x0d,
0x6c, 0x9c, 0x20, 0x96, 0x44, 0xe6, 0xbf, 0x12, 0xf9, 0x6d, 0x01, 0xf8, 0x38, 0xfe, 0xd6, 0x68,
0xf1, 0x14, 0x56, 0xc2, 0xe9, 0xd8, 0xa4, 0xa3, 0x4c, 0x8d, 0xfb, 0x39, 0xa9, 0x8e, 0x59, 0x34,
0xce, 0x50, 0xb9, 0x8a, 0x7c, 0xe0, 0xa0, 0x94, 0x60, 0x6e, 0x8d, 0x26, 0xd9, 0x0d, 0x5e, 0xbc,
0xbe, 0xc1, 0xf3, 0x68, 0x2a, 0xaf, 0x38, 0xb8, 0x6b, 0xd1, 0xf1, 0xcd, 0x7b, 0x2a, 0x7f, 0x2d,
0x12, 0xd2, 0xe2, 0xe7, 0x87, 0xc6, 0xbd, 0xec, 0xa4, 0x28, 0x87, 0xc6, 0x77, 0x98, 0x4c, 0x03,
0xa7, 0xe9, 0x10, 0x8f, 0x3d, 0x4e, 0x9a, 0xc9, 0x5f, 0x86, 0xef, 0x86, 0xdf, 0x78, 0xcd, 0xec,
0x26, 0x8e, 0xcf, 0x1c, 0x67, 0x96, 0x18, 0x64, 0xfb, 0x4b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1,
0xa1, 0x02, 0xbb, 0x71, 0x09, 0x00, 0x00,
}

View file

@ -0,0 +1,402 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p1beta1/web_detection.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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,proto3" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages,proto3" 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,proto3" 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,proto3" json:"pages_with_matching_images,omitempty"`
// The visually similar image results.
VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages,proto3" json:"visually_similar_images,omitempty"`
// Best guess text labels for the request image.
BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels,proto3" json:"best_guess_labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection) Reset() { *m = WebDetection{} }
func (m *WebDetection) String() string { return proto.CompactTextString(m) }
func (*WebDetection) ProtoMessage() {}
func (*WebDetection) Descriptor() ([]byte, []int) {
return fileDescriptor_ba190e118244c98b, []int{0}
}
func (m *WebDetection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection.Unmarshal(m, b)
}
func (m *WebDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection.Marshal(b, m, deterministic)
}
func (m *WebDetection) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection.Merge(m, src)
}
func (m *WebDetection) XXX_Size() int {
return xxx_messageInfo_WebDetection.Size(m)
}
func (m *WebDetection) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection proto.InternalMessageInfo
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
}
func (m *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImage {
if m != nil {
return m.VisuallySimilarImages
}
return nil
}
func (m *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabel {
if m != nil {
return m.BestGuessLabels
}
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,proto3" 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,proto3" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_ba190e118244c98b, []int{0, 0}
}
func (m *WebDetection_WebEntity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebEntity.Unmarshal(m, b)
}
func (m *WebDetection_WebEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebEntity.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebEntity) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebEntity.Merge(m, src)
}
func (m *WebDetection_WebEntity) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebEntity.Size(m)
}
func (m *WebDetection_WebEntity) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebEntity.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebEntity proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the image.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_ba190e118244c98b, []int{0, 1}
}
func (m *WebDetection_WebImage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebImage.Unmarshal(m, b)
}
func (m *WebDetection_WebImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebImage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebImage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebImage.Merge(m, src)
}
func (m *WebDetection_WebImage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebImage.Size(m)
}
func (m *WebDetection_WebImage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebImage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebImage proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the web page.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Title for the web page, may contain HTML markups.
PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle,proto3" json:"page_title,omitempty"`
// Fully matching images on the page.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images on the page.
// 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,5,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_ba190e118244c98b, []int{0, 2}
}
func (m *WebDetection_WebPage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebPage.Unmarshal(m, b)
}
func (m *WebDetection_WebPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebPage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebPage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebPage.Merge(m, src)
}
func (m *WebDetection_WebPage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebPage.Size(m)
}
func (m *WebDetection_WebPage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebPage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebPage proto.InternalMessageInfo
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 (m *WebDetection_WebPage) GetPageTitle() string {
if m != nil {
return m.PageTitle
}
return ""
}
func (m *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
// Label to provide extra metadata for the web detection.
type WebDetection_WebLabel struct {
// Label for extra metadata.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebLabel) Reset() { *m = WebDetection_WebLabel{} }
func (m *WebDetection_WebLabel) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebLabel) ProtoMessage() {}
func (*WebDetection_WebLabel) Descriptor() ([]byte, []int) {
return fileDescriptor_ba190e118244c98b, []int{0, 3}
}
func (m *WebDetection_WebLabel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebLabel.Unmarshal(m, b)
}
func (m *WebDetection_WebLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebLabel.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebLabel) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebLabel.Merge(m, src)
}
func (m *WebDetection_WebLabel) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebLabel.Size(m)
}
func (m *WebDetection_WebLabel) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebLabel.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebLabel proto.InternalMessageInfo
func (m *WebDetection_WebLabel) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *WebDetection_WebLabel) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func init() {
proto.RegisterType((*WebDetection)(nil), "google.cloud.vision.v1p1beta1.WebDetection")
proto.RegisterType((*WebDetection_WebEntity)(nil), "google.cloud.vision.v1p1beta1.WebDetection.WebEntity")
proto.RegisterType((*WebDetection_WebImage)(nil), "google.cloud.vision.v1p1beta1.WebDetection.WebImage")
proto.RegisterType((*WebDetection_WebPage)(nil), "google.cloud.vision.v1p1beta1.WebDetection.WebPage")
proto.RegisterType((*WebDetection_WebLabel)(nil), "google.cloud.vision.v1p1beta1.WebDetection.WebLabel")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p1beta1/web_detection.proto", fileDescriptor_ba190e118244c98b)
}
var fileDescriptor_ba190e118244c98b = []byte{
// 511 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0x95, 0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48, 0x08, 0x1e, 0x5a, 0xaa, 0x41, 0x0b, 0xee, 0x16, 0xe2, 0xa3, 0xf2,
0x09, 0x85, 0x1b, 0x1f, 0xc0, 0xd6, 0xff, 0x7b, 0x00, 0xdb, 0xff, 0xfc, 0x01, 0x84, 0x67, 0xa6,
0xb9, 0xe6, 0x2c, 0xb1, 0x2d, 0xe6, 0x86, 0xb8, 0x56, 0xd9, 0x82, 0xbe, 0x24, 0x0f, 0x05, 0xab,
0xca, 0x16, 0x5b, 0x93, 0xcb, 0xc2, 0x36, 0xcd, 0x4f, 0x86, 0x9d, 0x78, 0x2a, 0x0b, 0x7e, 0xf2,
0xd5, 0x23, 0xcf, 0x73, 0x39, 0xbf, 0x7d, 0x65, 0x27, 0x7b, 0xeb, 0x4b, 0x9b, 0xe2, 0x0f, 0x36,
0xf5, 0xbe, 0x9c, 0x3a, 0x4f, 0x29, 0x31, 0x31, 0x92, 0x4d, 0x19, 0x97, 0xbc, 0x32, 0xff, 0x5b,
0x6c, 0xa7, 0x58, 0x0d, 0xea, 0x86, 0x2f, 0xf5, 0x8d, 0x15, 0x7e, 0x78, 0x5e, 0xb6, 0x63, 0x2c,
0xc7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x19, 0xa7, 0x1d, 0x84, 0x05, 0x00, 0x00,
}

View file

@ -0,0 +1,268 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p2beta1/geometry.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y int32 `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Vertex) Reset() { *m = Vertex{} }
func (m *Vertex) String() string { return proto.CompactTextString(m) }
func (*Vertex) ProtoMessage() {}
func (*Vertex) Descriptor() ([]byte, []int) {
return fileDescriptor_e749cb92138e5a14, []int{0}
}
func (m *Vertex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Vertex.Unmarshal(m, b)
}
func (m *Vertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Vertex.Marshal(b, m, deterministic)
}
func (m *Vertex) XXX_Merge(src proto.Message) {
xxx_messageInfo_Vertex.Merge(m, src)
}
func (m *Vertex) XXX_Size() int {
return xxx_messageInfo_Vertex.Size(m)
}
func (m *Vertex) XXX_DiscardUnknown() {
xxx_messageInfo_Vertex.DiscardUnknown(m)
}
var xxx_messageInfo_Vertex proto.InternalMessageInfo
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 vertex represents a 2D point in the image.
// NOTE: the normalized vertex coordinates are relative to the original image
// and range from 0 to 1.
type NormalizedVertex struct {
// X coordinate.
X float32 `protobuf:"fixed32,1,opt,name=x,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NormalizedVertex) Reset() { *m = NormalizedVertex{} }
func (m *NormalizedVertex) String() string { return proto.CompactTextString(m) }
func (*NormalizedVertex) ProtoMessage() {}
func (*NormalizedVertex) Descriptor() ([]byte, []int) {
return fileDescriptor_e749cb92138e5a14, []int{1}
}
func (m *NormalizedVertex) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NormalizedVertex.Unmarshal(m, b)
}
func (m *NormalizedVertex) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NormalizedVertex.Marshal(b, m, deterministic)
}
func (m *NormalizedVertex) XXX_Merge(src proto.Message) {
xxx_messageInfo_NormalizedVertex.Merge(m, src)
}
func (m *NormalizedVertex) XXX_Size() int {
return xxx_messageInfo_NormalizedVertex.Size(m)
}
func (m *NormalizedVertex) XXX_DiscardUnknown() {
xxx_messageInfo_NormalizedVertex.DiscardUnknown(m)
}
var xxx_messageInfo_NormalizedVertex proto.InternalMessageInfo
func (m *NormalizedVertex) GetX() float32 {
if m != nil {
return m.X
}
return 0
}
func (m *NormalizedVertex) GetY() float32 {
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,proto3" json:"vertices,omitempty"`
// The bounding polygon normalized vertices.
NormalizedVertices []*NormalizedVertex `protobuf:"bytes,2,rep,name=normalized_vertices,json=normalizedVertices,proto3" json:"normalized_vertices,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *BoundingPoly) Reset() { *m = BoundingPoly{} }
func (m *BoundingPoly) String() string { return proto.CompactTextString(m) }
func (*BoundingPoly) ProtoMessage() {}
func (*BoundingPoly) Descriptor() ([]byte, []int) {
return fileDescriptor_e749cb92138e5a14, []int{2}
}
func (m *BoundingPoly) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BoundingPoly.Unmarshal(m, b)
}
func (m *BoundingPoly) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BoundingPoly.Marshal(b, m, deterministic)
}
func (m *BoundingPoly) XXX_Merge(src proto.Message) {
xxx_messageInfo_BoundingPoly.Merge(m, src)
}
func (m *BoundingPoly) XXX_Size() int {
return xxx_messageInfo_BoundingPoly.Size(m)
}
func (m *BoundingPoly) XXX_DiscardUnknown() {
xxx_messageInfo_BoundingPoly.DiscardUnknown(m)
}
var xxx_messageInfo_BoundingPoly proto.InternalMessageInfo
func (m *BoundingPoly) GetVertices() []*Vertex {
if m != nil {
return m.Vertices
}
return nil
}
func (m *BoundingPoly) GetNormalizedVertices() []*NormalizedVertex {
if m != nil {
return m.NormalizedVertices
}
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,proto3" json:"x,omitempty"`
// Y coordinate.
Y float32 `protobuf:"fixed32,2,opt,name=y,proto3" json:"y,omitempty"`
// Z coordinate (or depth).
Z float32 `protobuf:"fixed32,3,opt,name=z,proto3" json:"z,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Position) Reset() { *m = Position{} }
func (m *Position) String() string { return proto.CompactTextString(m) }
func (*Position) ProtoMessage() {}
func (*Position) Descriptor() ([]byte, []int) {
return fileDescriptor_e749cb92138e5a14, []int{3}
}
func (m *Position) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Position.Unmarshal(m, b)
}
func (m *Position) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Position.Marshal(b, m, deterministic)
}
func (m *Position) XXX_Merge(src proto.Message) {
xxx_messageInfo_Position.Merge(m, src)
}
func (m *Position) XXX_Size() int {
return xxx_messageInfo_Position.Size(m)
}
func (m *Position) XXX_DiscardUnknown() {
xxx_messageInfo_Position.DiscardUnknown(m)
}
var xxx_messageInfo_Position proto.InternalMessageInfo
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.v1p2beta1.Vertex")
proto.RegisterType((*NormalizedVertex)(nil), "google.cloud.vision.v1p2beta1.NormalizedVertex")
proto.RegisterType((*BoundingPoly)(nil), "google.cloud.vision.v1p2beta1.BoundingPoly")
proto.RegisterType((*Position)(nil), "google.cloud.vision.v1p2beta1.Position")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p2beta1/geometry.proto", fileDescriptor_e749cb92138e5a14)
}
var fileDescriptor_e749cb92138e5a14 = []byte{
// 283 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xc1, 0x4b, 0xc3, 0x30,
0x14, 0xc6, 0x49, 0x87, 0x63, 0xc4, 0x09, 0x52, 0x2f, 0xbd, 0x08, 0xb3, 0x28, 0xec, 0x20, 0x09,
0x9b, 0xde, 0x3c, 0x59, 0x0f, 0xde, 0xa4, 0xf4, 0xe0, 0xc1, 0x8b, 0x76, 0xed, 0x23, 0x04, 0xda,
0xbc, 0x92, 0x66, 0x65, 0x2d, 0xfe, 0x57, 0xfe, 0x73, 0x1e, 0xa5, 0xc9, 0x28, 0x6c, 0x60, 0x77,
0xfc, 0x5e, 0x7e, 0xef, 0x7b, 0x5f, 0xf8, 0xe8, 0xbd, 0x40, 0x14, 0x05, 0xf0, 0xac, 0xc0, 0x6d,
0xce, 0x1b, 0x59, 0x4b, 0x54, 0xbc, 0x59, 0x55, 0xeb, 0x0d, 0x98, 0x74, 0xc5, 0x05, 0x60, 0x09,
0x46, 0xb7, 0xac, 0xd2, 0x68, 0xd0, 0xbf, 0x76, 0x34, 0xb3, 0x34, 0x73, 0x34, 0x1b, 0xe8, 0xf0,
0x96, 0x4e, 0xdf, 0x41, 0x1b, 0xd8, 0xf9, 0x73, 0x4a, 0x76, 0x01, 0x59, 0x90, 0xe5, 0x59, 0x42,
0xac, 0x6a, 0x03, 0xcf, 0xa9, 0x36, 0x64, 0xf4, 0xf2, 0x0d, 0x75, 0x99, 0x16, 0xb2, 0x83, 0xfc,
0x98, 0xf7, 0x0e, 0x78, 0xaf, 0xe7, 0x7f, 0x08, 0x9d, 0x47, 0xb8, 0x55, 0xb9, 0x54, 0x22, 0xc6,
0xa2, 0xf5, 0x9f, 0xe9, 0xac, 0x01, 0x6d, 0x64, 0x06, 0x75, 0x40, 0x16, 0x93, 0xe5, 0xf9, 0xfa,
0x8e, 0x8d, 0x06, 0x63, 0xee, 0x4a, 0x32, 0xac, 0xf9, 0x5f, 0xf4, 0x4a, 0x0d, 0x19, 0x3e, 0x07,
0x37, 0xcf, 0xba, 0xf1, 0x13, 0x6e, 0xc7, 0xe9, 0x13, 0x5f, 0x1d, 0x4c, 0x7a, 0xab, 0xf0, 0x91,
0xce, 0x62, 0xac, 0xa5, 0x91, 0xa8, 0xc6, 0x7e, 0xd7, 0xab, 0x2e, 0x98, 0x38, 0xd5, 0x45, 0xdf,
0xf4, 0x26, 0xc3, 0x72, 0xfc, 0x7e, 0x74, 0xf1, 0xba, 0x6f, 0x25, 0xee, 0x4b, 0x89, 0xc9, 0xc7,
0xcb, 0x9e, 0x17, 0x58, 0xa4, 0x4a, 0x30, 0xd4, 0x82, 0x0b, 0x50, 0xb6, 0x32, 0xee, 0x9e, 0xd2,
0x4a, 0xd6, 0xff, 0x74, 0xfc, 0xe4, 0x06, 0xbf, 0x84, 0x6c, 0xa6, 0x76, 0xe5, 0xe1, 0x2f, 0x00,
0x00, 0xff, 0xff, 0x3d, 0xe4, 0x63, 0xcf, 0x15, 0x02, 0x00, 0x00,
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,812 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p2beta1/text_annotation.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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 not co-occur with
// `SPACE`, `LEADER_SPACE`, or `LINE_BREAK`.
TextAnnotation_DetectedBreak_HYPHEN TextAnnotation_DetectedBreak_BreakType = 4
// 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 fileDescriptor_5d838ababbc8449e, []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 fileDescriptor_5d838ababbc8449e, []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 [TextAnnotation.TextProperty][google.cloud.vision.v1p2beta1.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,proto3" json:"pages,omitempty"`
// UTF-8 text detected on the pages.
Text string `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TextAnnotation) Reset() { *m = TextAnnotation{} }
func (m *TextAnnotation) String() string { return proto.CompactTextString(m) }
func (*TextAnnotation) ProtoMessage() {}
func (*TextAnnotation) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{0}
}
func (m *TextAnnotation) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation.Unmarshal(m, b)
}
func (m *TextAnnotation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation.Marshal(b, m, deterministic)
}
func (m *TextAnnotation) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation.Merge(m, src)
}
func (m *TextAnnotation) XXX_Size() int {
return xxx_messageInfo_TextAnnotation.Size(m)
}
func (m *TextAnnotation) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation proto.InternalMessageInfo
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,proto3" json:"language_code,omitempty"`
// Confidence of detected language. Range [0, 1].
Confidence float32 `protobuf:"fixed32,2,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_5d838ababbc8449e, []int{0, 0}
}
func (m *TextAnnotation_DetectedLanguage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedLanguage.Merge(m, src)
}
func (m *TextAnnotation_DetectedLanguage) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedLanguage.Size(m)
}
func (m *TextAnnotation_DetectedLanguage) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedLanguage.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedLanguage proto.InternalMessageInfo
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 {
// Detected break type.
Type TextAnnotation_DetectedBreak_BreakType `protobuf:"varint,1,opt,name=type,proto3,enum=google.cloud.vision.v1p2beta1.TextAnnotation_DetectedBreak_BreakType" json:"type,omitempty"`
// True if break prepends the element.
IsPrefix bool `protobuf:"varint,2,opt,name=is_prefix,json=isPrefix,proto3" json:"is_prefix,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_5d838ababbc8449e, []int{0, 1}
}
func (m *TextAnnotation_DetectedBreak) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Unmarshal(m, b)
}
func (m *TextAnnotation_DetectedBreak) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_DetectedBreak) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_DetectedBreak.Merge(m, src)
}
func (m *TextAnnotation_DetectedBreak) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_DetectedBreak.Size(m)
}
func (m *TextAnnotation_DetectedBreak) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_DetectedBreak.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_DetectedBreak proto.InternalMessageInfo
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,proto3" json:"detected_languages,omitempty"`
// Detected start or end of a text segment.
DetectedBreak *TextAnnotation_DetectedBreak `protobuf:"bytes,2,opt,name=detected_break,json=detectedBreak,proto3" json:"detected_break,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_5d838ababbc8449e, []int{0, 2}
}
func (m *TextAnnotation_TextProperty) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TextAnnotation_TextProperty.Unmarshal(m, b)
}
func (m *TextAnnotation_TextProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TextAnnotation_TextProperty.Marshal(b, m, deterministic)
}
func (m *TextAnnotation_TextProperty) XXX_Merge(src proto.Message) {
xxx_messageInfo_TextAnnotation_TextProperty.Merge(m, src)
}
func (m *TextAnnotation_TextProperty) XXX_Size() int {
return xxx_messageInfo_TextAnnotation_TextProperty.Size(m)
}
func (m *TextAnnotation_TextProperty) XXX_DiscardUnknown() {
xxx_messageInfo_TextAnnotation_TextProperty.DiscardUnknown(m)
}
var xxx_messageInfo_TextAnnotation_TextProperty proto.InternalMessageInfo
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,proto3" json:"property,omitempty"`
// Page width. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Width int32 `protobuf:"varint,2,opt,name=width,proto3" json:"width,omitempty"`
// Page height. For PDFs the unit is points. For images (including
// TIFFs) the unit is pixels.
Height int32 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
// List of blocks of text, images etc on this page.
Blocks []*Block `protobuf:"bytes,4,rep,name=blocks,proto3" json:"blocks,omitempty"`
// Confidence of the OCR results on the page. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Page) Reset() { *m = Page{} }
func (m *Page) String() string { return proto.CompactTextString(m) }
func (*Page) ProtoMessage() {}
func (*Page) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{1}
}
func (m *Page) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Page.Unmarshal(m, b)
}
func (m *Page) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Page.Marshal(b, m, deterministic)
}
func (m *Page) XXX_Merge(src proto.Message) {
xxx_messageInfo_Page.Merge(m, src)
}
func (m *Page) XXX_Size() int {
return xxx_messageInfo_Page.Size(m)
}
func (m *Page) XXX_DiscardUnknown() {
xxx_messageInfo_Page.DiscardUnknown(m)
}
var xxx_messageInfo_Page proto.InternalMessageInfo
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
}
func (m *Page) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// Logical element on the page.
type Block struct {
// Additional information detected for the block.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"paragraphs,omitempty"`
// Detected block type (text, image etc) for this block.
BlockType Block_BlockType `protobuf:"varint,4,opt,name=block_type,json=blockType,proto3,enum=google.cloud.vision.v1p2beta1.Block_BlockType" json:"block_type,omitempty"`
// Confidence of the OCR results on the block. Range [0, 1].
Confidence float32 `protobuf:"fixed32,5,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Block) Reset() { *m = Block{} }
func (m *Block) String() string { return proto.CompactTextString(m) }
func (*Block) ProtoMessage() {}
func (*Block) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{2}
}
func (m *Block) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Block.Unmarshal(m, b)
}
func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Block.Marshal(b, m, deterministic)
}
func (m *Block) XXX_Merge(src proto.Message) {
xxx_messageInfo_Block.Merge(m, src)
}
func (m *Block) XXX_Size() int {
return xxx_messageInfo_Block.Size(m)
}
func (m *Block) XXX_DiscardUnknown() {
xxx_messageInfo_Block.DiscardUnknown(m)
}
var xxx_messageInfo_Block proto.InternalMessageInfo
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
}
func (m *Block) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// 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,proto3" 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,proto3" json:"bounding_box,omitempty"`
// List of words in this paragraph.
Words []*Word `protobuf:"bytes,3,rep,name=words,proto3" json:"words,omitempty"`
// Confidence of the OCR results for the paragraph. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Paragraph) Reset() { *m = Paragraph{} }
func (m *Paragraph) String() string { return proto.CompactTextString(m) }
func (*Paragraph) ProtoMessage() {}
func (*Paragraph) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{3}
}
func (m *Paragraph) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Paragraph.Unmarshal(m, b)
}
func (m *Paragraph) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Paragraph.Marshal(b, m, deterministic)
}
func (m *Paragraph) XXX_Merge(src proto.Message) {
xxx_messageInfo_Paragraph.Merge(m, src)
}
func (m *Paragraph) XXX_Size() int {
return xxx_messageInfo_Paragraph.Size(m)
}
func (m *Paragraph) XXX_DiscardUnknown() {
xxx_messageInfo_Paragraph.DiscardUnknown(m)
}
var xxx_messageInfo_Paragraph proto.InternalMessageInfo
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
}
func (m *Paragraph) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A word representation.
type Word struct {
// Additional information detected for the word.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" 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,proto3" json:"symbols,omitempty"`
// Confidence of the OCR results for the word. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Word) Reset() { *m = Word{} }
func (m *Word) String() string { return proto.CompactTextString(m) }
func (*Word) ProtoMessage() {}
func (*Word) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{4}
}
func (m *Word) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Word.Unmarshal(m, b)
}
func (m *Word) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Word.Marshal(b, m, deterministic)
}
func (m *Word) XXX_Merge(src proto.Message) {
xxx_messageInfo_Word.Merge(m, src)
}
func (m *Word) XXX_Size() int {
return xxx_messageInfo_Word.Size(m)
}
func (m *Word) XXX_DiscardUnknown() {
xxx_messageInfo_Word.DiscardUnknown(m)
}
var xxx_messageInfo_Word proto.InternalMessageInfo
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
}
func (m *Word) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
// A single symbol representation.
type Symbol struct {
// Additional information detected for the symbol.
Property *TextAnnotation_TextProperty `protobuf:"bytes,1,opt,name=property,proto3" 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,proto3" json:"bounding_box,omitempty"`
// The actual UTF-8 representation of the symbol.
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,omitempty"`
// Confidence of the OCR results for the symbol. Range [0, 1].
Confidence float32 `protobuf:"fixed32,4,opt,name=confidence,proto3" json:"confidence,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Symbol) Reset() { *m = Symbol{} }
func (m *Symbol) String() string { return proto.CompactTextString(m) }
func (*Symbol) ProtoMessage() {}
func (*Symbol) Descriptor() ([]byte, []int) {
return fileDescriptor_5d838ababbc8449e, []int{5}
}
func (m *Symbol) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Symbol.Unmarshal(m, b)
}
func (m *Symbol) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Symbol.Marshal(b, m, deterministic)
}
func (m *Symbol) XXX_Merge(src proto.Message) {
xxx_messageInfo_Symbol.Merge(m, src)
}
func (m *Symbol) XXX_Size() int {
return xxx_messageInfo_Symbol.Size(m)
}
func (m *Symbol) XXX_DiscardUnknown() {
xxx_messageInfo_Symbol.DiscardUnknown(m)
}
var xxx_messageInfo_Symbol proto.InternalMessageInfo
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 (m *Symbol) GetConfidence() float32 {
if m != nil {
return m.Confidence
}
return 0
}
func init() {
proto.RegisterEnum("google.cloud.vision.v1p2beta1.TextAnnotation_DetectedBreak_BreakType", TextAnnotation_DetectedBreak_BreakType_name, TextAnnotation_DetectedBreak_BreakType_value)
proto.RegisterEnum("google.cloud.vision.v1p2beta1.Block_BlockType", Block_BlockType_name, Block_BlockType_value)
proto.RegisterType((*TextAnnotation)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation")
proto.RegisterType((*TextAnnotation_DetectedLanguage)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage")
proto.RegisterType((*TextAnnotation_DetectedBreak)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak")
proto.RegisterType((*TextAnnotation_TextProperty)(nil), "google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty")
proto.RegisterType((*Page)(nil), "google.cloud.vision.v1p2beta1.Page")
proto.RegisterType((*Block)(nil), "google.cloud.vision.v1p2beta1.Block")
proto.RegisterType((*Paragraph)(nil), "google.cloud.vision.v1p2beta1.Paragraph")
proto.RegisterType((*Word)(nil), "google.cloud.vision.v1p2beta1.Word")
proto.RegisterType((*Symbol)(nil), "google.cloud.vision.v1p2beta1.Symbol")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p2beta1/text_annotation.proto", fileDescriptor_5d838ababbc8449e)
}
var fileDescriptor_5d838ababbc8449e = []byte{
// 774 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xd3, 0x48,
0x14, 0x5f, 0x27, 0x76, 0x1a, 0xbf, 0xb4, 0x91, 0x77, 0x76, 0xb5, 0x8a, 0xb2, 0xbb, 0xa8, 0xa4,
0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x97, 0x71, 0x09, 0x00, 0x00,
}

View file

@ -0,0 +1,402 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/cloud/vision/v1p2beta1/web_detection.proto
package vision
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
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
// 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,proto3" json:"web_entities,omitempty"`
// Fully matching images from the Internet.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,2,rep,name=full_matching_images,json=fullMatchingImages,proto3" 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,proto3" 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,proto3" json:"pages_with_matching_images,omitempty"`
// The visually similar image results.
VisuallySimilarImages []*WebDetection_WebImage `protobuf:"bytes,6,rep,name=visually_similar_images,json=visuallySimilarImages,proto3" json:"visually_similar_images,omitempty"`
// Best guess text labels for the request image.
BestGuessLabels []*WebDetection_WebLabel `protobuf:"bytes,8,rep,name=best_guess_labels,json=bestGuessLabels,proto3" json:"best_guess_labels,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection) Reset() { *m = WebDetection{} }
func (m *WebDetection) String() string { return proto.CompactTextString(m) }
func (*WebDetection) ProtoMessage() {}
func (*WebDetection) Descriptor() ([]byte, []int) {
return fileDescriptor_c9258baccea8b1f2, []int{0}
}
func (m *WebDetection) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection.Unmarshal(m, b)
}
func (m *WebDetection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection.Marshal(b, m, deterministic)
}
func (m *WebDetection) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection.Merge(m, src)
}
func (m *WebDetection) XXX_Size() int {
return xxx_messageInfo_WebDetection.Size(m)
}
func (m *WebDetection) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection proto.InternalMessageInfo
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
}
func (m *WebDetection) GetVisuallySimilarImages() []*WebDetection_WebImage {
if m != nil {
return m.VisuallySimilarImages
}
return nil
}
func (m *WebDetection) GetBestGuessLabels() []*WebDetection_WebLabel {
if m != nil {
return m.BestGuessLabels
}
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,proto3" 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,proto3" json:"score,omitempty"`
// Canonical description of the entity, in English.
Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_c9258baccea8b1f2, []int{0, 0}
}
func (m *WebDetection_WebEntity) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebEntity.Unmarshal(m, b)
}
func (m *WebDetection_WebEntity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebEntity.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebEntity) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebEntity.Merge(m, src)
}
func (m *WebDetection_WebEntity) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebEntity.Size(m)
}
func (m *WebDetection_WebEntity) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebEntity.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebEntity proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the image.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_c9258baccea8b1f2, []int{0, 1}
}
func (m *WebDetection_WebImage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebImage.Unmarshal(m, b)
}
func (m *WebDetection_WebImage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebImage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebImage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebImage.Merge(m, src)
}
func (m *WebDetection_WebImage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebImage.Size(m)
}
func (m *WebDetection_WebImage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebImage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebImage proto.InternalMessageInfo
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,proto3" json:"url,omitempty"`
// (Deprecated) Overall relevancy score for the web page.
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
// Title for the web page, may contain HTML markups.
PageTitle string `protobuf:"bytes,3,opt,name=page_title,json=pageTitle,proto3" json:"page_title,omitempty"`
// Fully matching images on the page.
// Can include resized copies of the query image.
FullMatchingImages []*WebDetection_WebImage `protobuf:"bytes,4,rep,name=full_matching_images,json=fullMatchingImages,proto3" json:"full_matching_images,omitempty"`
// Partial matching images on the page.
// 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,5,rep,name=partial_matching_images,json=partialMatchingImages,proto3" json:"partial_matching_images,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
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 fileDescriptor_c9258baccea8b1f2, []int{0, 2}
}
func (m *WebDetection_WebPage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebPage.Unmarshal(m, b)
}
func (m *WebDetection_WebPage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebPage.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebPage) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebPage.Merge(m, src)
}
func (m *WebDetection_WebPage) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebPage.Size(m)
}
func (m *WebDetection_WebPage) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebPage.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebPage proto.InternalMessageInfo
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 (m *WebDetection_WebPage) GetPageTitle() string {
if m != nil {
return m.PageTitle
}
return ""
}
func (m *WebDetection_WebPage) GetFullMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.FullMatchingImages
}
return nil
}
func (m *WebDetection_WebPage) GetPartialMatchingImages() []*WebDetection_WebImage {
if m != nil {
return m.PartialMatchingImages
}
return nil
}
// Label to provide extra metadata for the web detection.
type WebDetection_WebLabel struct {
// Label for extra metadata.
Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"`
// The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
// For more information, see
// http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
LanguageCode string `protobuf:"bytes,2,opt,name=language_code,json=languageCode,proto3" json:"language_code,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *WebDetection_WebLabel) Reset() { *m = WebDetection_WebLabel{} }
func (m *WebDetection_WebLabel) String() string { return proto.CompactTextString(m) }
func (*WebDetection_WebLabel) ProtoMessage() {}
func (*WebDetection_WebLabel) Descriptor() ([]byte, []int) {
return fileDescriptor_c9258baccea8b1f2, []int{0, 3}
}
func (m *WebDetection_WebLabel) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_WebDetection_WebLabel.Unmarshal(m, b)
}
func (m *WebDetection_WebLabel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_WebDetection_WebLabel.Marshal(b, m, deterministic)
}
func (m *WebDetection_WebLabel) XXX_Merge(src proto.Message) {
xxx_messageInfo_WebDetection_WebLabel.Merge(m, src)
}
func (m *WebDetection_WebLabel) XXX_Size() int {
return xxx_messageInfo_WebDetection_WebLabel.Size(m)
}
func (m *WebDetection_WebLabel) XXX_DiscardUnknown() {
xxx_messageInfo_WebDetection_WebLabel.DiscardUnknown(m)
}
var xxx_messageInfo_WebDetection_WebLabel proto.InternalMessageInfo
func (m *WebDetection_WebLabel) GetLabel() string {
if m != nil {
return m.Label
}
return ""
}
func (m *WebDetection_WebLabel) GetLanguageCode() string {
if m != nil {
return m.LanguageCode
}
return ""
}
func init() {
proto.RegisterType((*WebDetection)(nil), "google.cloud.vision.v1p2beta1.WebDetection")
proto.RegisterType((*WebDetection_WebEntity)(nil), "google.cloud.vision.v1p2beta1.WebDetection.WebEntity")
proto.RegisterType((*WebDetection_WebImage)(nil), "google.cloud.vision.v1p2beta1.WebDetection.WebImage")
proto.RegisterType((*WebDetection_WebPage)(nil), "google.cloud.vision.v1p2beta1.WebDetection.WebPage")
proto.RegisterType((*WebDetection_WebLabel)(nil), "google.cloud.vision.v1p2beta1.WebDetection.WebLabel")
}
func init() {
proto.RegisterFile("google/cloud/vision/v1p2beta1/web_detection.proto", fileDescriptor_c9258baccea8b1f2)
}
var fileDescriptor_c9258baccea8b1f2 = []byte{
// 511 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4f, 0x6f, 0xd3, 0x30,
0x18, 0xc6, 0x95, 0x76, 0x1b, 0x8d, 0x5b, 0x04, 0xb3, 0x86, 0x16, 0x05, 0x26, 0x15, 0xb8, 0xf4,
0x94, 0xa8, 0x1d, 0x9c, 0xb8, 0x6d, 0x4c, 0x68, 0x12, 0x48, 0x55, 0x40, 0x1a, 0xe2, 0x92, 0x39,
0x89, 0x97, 0xbe, 0x92, 0x1b, 0x47, 0xb1, 0xd3, 0xaa, 0x37, 0x4e, 0x7c, 0x14, 0x3e, 0x23, 0x47,
0xf4, 0xda, 0xee, 0x54, 0x51, 0x36, 0x31, 0x86, 0xb8, 0xf9, 0x7d, 0xac, 0xe7, 0xf9, 0xd9, 0xaf,
0xff, 0x90, 0x71, 0x29, 0x65, 0x29, 0x78, 0x9c, 0x0b, 0xd9, 0x16, 0xf1, 0x02, 0x14, 0xc8, 0x2a,
0x5e, 0x8c, 0xeb, 0x49, 0xc6, 0x35, 0x1b, 0xc7, 0x4b, 0x9e, 0xa5, 0x05, 0xd7, 0x3c, 0xd7, 0x20,
0xab, 0xa8, 0x6e, 0xa4, 0x96, 0xf4, 0xc8, 0x5a, 0x22, 0x63, 0x89, 0xac, 0x25, 0xba, 0xb6, 0x84,
0xcf, 0x5c, 0x22, 0xab, 0x21, 0x66, 0x55, 0x25, 0x35, 0x43, 0xaf, 0xb2, 0xe6, 0x17, 0xdf, 0x7c,
0x32, 0xb8, 0xe0, 0xd9, 0xdb, 0x75, 0x26, 0xfd, 0x4c, 0x06, 0x08, 0xe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2e, 0x1b, 0x1e, 0x74, 0x86, 0xde, 0xa8, 0x93, 0xd8, 0x82, 0x0e, 0x49, 0xbf, 0xe0,
0x2a, 0x6f, 0xa0, 0x46, 0x50, 0xd0, 0x35, 0xa6, 0x4d, 0x29, 0x9c, 0x90, 0xde, 0x7a, 0x9b, 0xf4,
0x31, 0xe9, 0xb6, 0x8d, 0x70, 0xd1, 0x38, 0xfc, 0x7d, 0x6a, 0xf8, 0xbd, 0x43, 0x1e, 0xb8, 0xa3,
0xf8, 0x53, 0x0f, 0x3d, 0x22, 0x04, 0x0f, 0x2d, 0xd5, 0xa0, 0x05, 0x77, 0x0b, 0xf1, 0x51, 0xf9,
0x84, 0xc2, 0x8d, 0x0f, 0x60, 0xe7, 0xff, 0x3d, 0x80, 0xdd, 0x7f, 0xfe, 0x00, 0xc2, 0x33, 0xd3,
0x5c, 0x73, 0x96, 0xd8, 0x16, 0x73, 0x43, 0x5c, 0xab, 0x6c, 0x41, 0x5f, 0x92, 0x87, 0x82, 0x55,
0x65, 0x8b, 0xad, 0xc9, 0x65, 0x61, 0x9b, 0xe6, 0x27, 0x83, 0xb5, 0x78, 0x2a, 0x0b, 0x7e, 0xf2,
0xd5, 0x23, 0xcf, 0x73, 0x39, 0xbf, 0x7d, 0x65, 0x27, 0xfb, 0x9b, 0x4b, 0x9b, 0xe2, 0x0f, 0x36,
0xf5, 0xbe, 0x9c, 0x3a, 0x4f, 0x29, 0x31, 0x31, 0x92, 0x4d, 0x19, 0x97, 0xbc, 0x32, 0xff, 0x5b,
0x6c, 0xa7, 0x58, 0x0d, 0xea, 0x86, 0x2f, 0xf5, 0x8d, 0x15, 0x7e, 0x78, 0x5e, 0xb6, 0x67, 0x2c,
0xc7, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x66, 0x62, 0xaa, 0xcd, 0x84, 0x05, 0x00, 0x00,
}

Some files were not shown because too many files have changed in this diff Show more