...

Source file src/cloud.google.com/go/bigquery/storage/apiv1beta1/storagepb/read_options.pb.go

Documentation: cloud.google.com/go/bigquery/storage/apiv1beta1/storagepb

     1  // Copyright 2023 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // Code generated by protoc-gen-go. DO NOT EDIT.
    16  // versions:
    17  // 	protoc-gen-go v1.32.0
    18  // 	protoc        v4.25.2
    19  // source: google/cloud/bigquery/storage/v1beta1/read_options.proto
    20  
    21  package storagepb
    22  
    23  import (
    24  	reflect "reflect"
    25  	sync "sync"
    26  
    27  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    28  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    29  )
    30  
    31  const (
    32  	// Verify that this generated code is sufficiently up-to-date.
    33  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    34  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    35  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    36  )
    37  
    38  // Options dictating how we read a table.
    39  type TableReadOptions struct {
    40  	state         protoimpl.MessageState
    41  	sizeCache     protoimpl.SizeCache
    42  	unknownFields protoimpl.UnknownFields
    43  
    44  	// Optional. The names of the fields in the table to be returned. If no
    45  	// field names are specified, then all fields in the table are returned.
    46  	//
    47  	// Nested fields -- the child elements of a STRUCT field -- can be selected
    48  	// individually using their fully-qualified names, and will be returned as
    49  	// record fields containing only the selected nested fields. If a STRUCT
    50  	// field is specified in the selected fields list, all of the child elements
    51  	// will be returned.
    52  	//
    53  	// As an example, consider a table with the following schema:
    54  	//
    55  	//	{
    56  	//	    "name": "struct_field",
    57  	//	    "type": "RECORD",
    58  	//	    "mode": "NULLABLE",
    59  	//	    "fields": [
    60  	//	        {
    61  	//	            "name": "string_field1",
    62  	//	            "type": "STRING",
    63  	//
    64  	// .              "mode": "NULLABLE"
    65  	//
    66  	//	        },
    67  	//	        {
    68  	//	            "name": "string_field2",
    69  	//	            "type": "STRING",
    70  	//	            "mode": "NULLABLE"
    71  	//	        }
    72  	//	    ]
    73  	//	}
    74  	//
    75  	// Specifying "struct_field" in the selected fields list will result in a
    76  	// read session schema with the following logical structure:
    77  	//
    78  	//	struct_field {
    79  	//	    string_field1
    80  	//	    string_field2
    81  	//	}
    82  	//
    83  	// Specifying "struct_field.string_field1" in the selected fields list will
    84  	// result in a read session schema with the following logical structure:
    85  	//
    86  	//	struct_field {
    87  	//	    string_field1
    88  	//	}
    89  	//
    90  	// The order of the fields in the read session schema is derived from the
    91  	// table schema and does not correspond to the order in which the fields are
    92  	// specified in this list.
    93  	SelectedFields []string `protobuf:"bytes,1,rep,name=selected_fields,json=selectedFields,proto3" json:"selected_fields,omitempty"`
    94  	// Optional. SQL text filtering statement, similar to a WHERE clause in
    95  	// a SQL query. Aggregates are not supported.
    96  	//
    97  	// Examples: "int_field > 5"
    98  	//
    99  	//	"date_field = CAST('2014-9-27' as DATE)"
   100  	//	"nullable_field is not NULL"
   101  	//	"st_equals(geo_field, st_geofromtext("POINT(2, 2)"))"
   102  	//	"numeric_field BETWEEN 1.0 AND 5.0"
   103  	//
   104  	// Restricted to a maximum length for 1 MB.
   105  	RowRestriction string `protobuf:"bytes,2,opt,name=row_restriction,json=rowRestriction,proto3" json:"row_restriction,omitempty"`
   106  }
   107  
   108  func (x *TableReadOptions) Reset() {
   109  	*x = TableReadOptions{}
   110  	if protoimpl.UnsafeEnabled {
   111  		mi := &file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0]
   112  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   113  		ms.StoreMessageInfo(mi)
   114  	}
   115  }
   116  
   117  func (x *TableReadOptions) String() string {
   118  	return protoimpl.X.MessageStringOf(x)
   119  }
   120  
   121  func (*TableReadOptions) ProtoMessage() {}
   122  
   123  func (x *TableReadOptions) ProtoReflect() protoreflect.Message {
   124  	mi := &file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0]
   125  	if protoimpl.UnsafeEnabled && x != nil {
   126  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   127  		if ms.LoadMessageInfo() == nil {
   128  			ms.StoreMessageInfo(mi)
   129  		}
   130  		return ms
   131  	}
   132  	return mi.MessageOf(x)
   133  }
   134  
   135  // Deprecated: Use TableReadOptions.ProtoReflect.Descriptor instead.
   136  func (*TableReadOptions) Descriptor() ([]byte, []int) {
   137  	return file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescGZIP(), []int{0}
   138  }
   139  
   140  func (x *TableReadOptions) GetSelectedFields() []string {
   141  	if x != nil {
   142  		return x.SelectedFields
   143  	}
   144  	return nil
   145  }
   146  
   147  func (x *TableReadOptions) GetRowRestriction() string {
   148  	if x != nil {
   149  		return x.RowRestriction
   150  	}
   151  	return ""
   152  }
   153  
   154  var File_google_cloud_bigquery_storage_v1beta1_read_options_proto protoreflect.FileDescriptor
   155  
   156  var file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDesc = []byte{
   157  	0x0a, 0x38, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x62,
   158  	0x69, 0x67, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f,
   159  	0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x61, 0x64, 0x5f, 0x6f, 0x70, 0x74,
   160  	0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x25, 0x67, 0x6f, 0x6f, 0x67,
   161  	0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65, 0x72,
   162  	0x79, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61,
   163  	0x31, 0x22, 0x64, 0x0a, 0x10, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65, 0x61, 0x64, 0x4f, 0x70,
   164  	0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65,
   165  	0x64, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e,
   166  	0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x27,
   167  	0x0a, 0x0f, 0x72, 0x6f, 0x77, 0x5f, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f,
   168  	0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x6f, 0x77, 0x52, 0x65, 0x73, 0x74,
   169  	0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x70, 0x0a, 0x29, 0x63, 0x6f, 0x6d, 0x2e, 0x67,
   170  	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x62, 0x69, 0x67, 0x71,
   171  	0x75, 0x65, 0x72, 0x79, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x62,
   172  	0x65, 0x74, 0x61, 0x31, 0x5a, 0x43, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
   173  	0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x69, 0x67, 0x71, 0x75, 0x65,
   174  	0x72, 0x79, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x76, 0x31,
   175  	0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x3b,
   176  	0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   177  	0x33,
   178  }
   179  
   180  var (
   181  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescOnce sync.Once
   182  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescData = file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDesc
   183  )
   184  
   185  func file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescGZIP() []byte {
   186  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescOnce.Do(func() {
   187  		file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescData)
   188  	})
   189  	return file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDescData
   190  }
   191  
   192  var file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
   193  var file_google_cloud_bigquery_storage_v1beta1_read_options_proto_goTypes = []interface{}{
   194  	(*TableReadOptions)(nil), // 0: google.cloud.bigquery.storage.v1beta1.TableReadOptions
   195  }
   196  var file_google_cloud_bigquery_storage_v1beta1_read_options_proto_depIdxs = []int32{
   197  	0, // [0:0] is the sub-list for method output_type
   198  	0, // [0:0] is the sub-list for method input_type
   199  	0, // [0:0] is the sub-list for extension type_name
   200  	0, // [0:0] is the sub-list for extension extendee
   201  	0, // [0:0] is the sub-list for field type_name
   202  }
   203  
   204  func init() { file_google_cloud_bigquery_storage_v1beta1_read_options_proto_init() }
   205  func file_google_cloud_bigquery_storage_v1beta1_read_options_proto_init() {
   206  	if File_google_cloud_bigquery_storage_v1beta1_read_options_proto != nil {
   207  		return
   208  	}
   209  	if !protoimpl.UnsafeEnabled {
   210  		file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   211  			switch v := v.(*TableReadOptions); i {
   212  			case 0:
   213  				return &v.state
   214  			case 1:
   215  				return &v.sizeCache
   216  			case 2:
   217  				return &v.unknownFields
   218  			default:
   219  				return nil
   220  			}
   221  		}
   222  	}
   223  	type x struct{}
   224  	out := protoimpl.TypeBuilder{
   225  		File: protoimpl.DescBuilder{
   226  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   227  			RawDescriptor: file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDesc,
   228  			NumEnums:      0,
   229  			NumMessages:   1,
   230  			NumExtensions: 0,
   231  			NumServices:   0,
   232  		},
   233  		GoTypes:           file_google_cloud_bigquery_storage_v1beta1_read_options_proto_goTypes,
   234  		DependencyIndexes: file_google_cloud_bigquery_storage_v1beta1_read_options_proto_depIdxs,
   235  		MessageInfos:      file_google_cloud_bigquery_storage_v1beta1_read_options_proto_msgTypes,
   236  	}.Build()
   237  	File_google_cloud_bigquery_storage_v1beta1_read_options_proto = out.File
   238  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_rawDesc = nil
   239  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_goTypes = nil
   240  	file_google_cloud_bigquery_storage_v1beta1_read_options_proto_depIdxs = nil
   241  }
   242  

View as plain text