diff --git a/api_names_out.yaml b/api_names_out.yaml index 0525a6e26..1bc32a361 100644 --- a/api_names_out.yaml +++ b/api_names_out.yaml @@ -15996,6 +15996,7 @@ "/bigquery:v2/JobConfigurationLoad/hivePartitioningMode": hive_partitioning_mode "/bigquery:v2/JobConfigurationLoad/hivePartitioningOptions": hive_partitioning_options "/bigquery:v2/JobConfigurationLoad/ignoreUnknownValues": ignore_unknown_values +"/bigquery:v2/JobConfigurationLoad/jsonExtension": json_extension "/bigquery:v2/JobConfigurationLoad/maxBadRecords": max_bad_records "/bigquery:v2/JobConfigurationLoad/nullMarker": null_marker "/bigquery:v2/JobConfigurationLoad/projectionFields": projection_fields @@ -16653,12 +16654,18 @@ "/bigquery:v2/bigquery.routines.update/datasetId": dataset_id "/bigquery:v2/bigquery.routines.update/projectId": project_id "/bigquery:v2/bigquery.routines.update/routineId": routine_id +"/bigquery:v2/bigquery.rowAccessPolicies.getIamPolicy": get_row_access_policy_iam_policy +"/bigquery:v2/bigquery.rowAccessPolicies.getIamPolicy/resource": resource "/bigquery:v2/bigquery.rowAccessPolicies.list": list_row_access_policies "/bigquery:v2/bigquery.rowAccessPolicies.list/datasetId": dataset_id "/bigquery:v2/bigquery.rowAccessPolicies.list/pageSize": page_size "/bigquery:v2/bigquery.rowAccessPolicies.list/pageToken": page_token "/bigquery:v2/bigquery.rowAccessPolicies.list/projectId": project_id "/bigquery:v2/bigquery.rowAccessPolicies.list/tableId": table_id +"/bigquery:v2/bigquery.rowAccessPolicies.setIamPolicy": set_row_access_policy_iam_policy +"/bigquery:v2/bigquery.rowAccessPolicies.setIamPolicy/resource": resource +"/bigquery:v2/bigquery.rowAccessPolicies.testIamPermissions": test_row_access_policy_iam_permissions +"/bigquery:v2/bigquery.rowAccessPolicies.testIamPermissions/resource": resource "/bigquery:v2/bigquery.tabledata.insertAll": insert_all_table_data "/bigquery:v2/bigquery.tabledata.insertAll/datasetId": dataset_id "/bigquery:v2/bigquery.tabledata.insertAll/projectId": project_id diff --git a/generated/google-apis-bigquery_v2/CHANGELOG.md b/generated/google-apis-bigquery_v2/CHANGELOG.md index 3f10ae14a..9e1eb6ab5 100644 --- a/generated/google-apis-bigquery_v2/CHANGELOG.md +++ b/generated/google-apis-bigquery_v2/CHANGELOG.md @@ -1,5 +1,9 @@ # Release history for google-apis-bigquery_v2 +### v0.2.0 (2021-01-09) + +* Regenerated from discovery document revision 20210104 + ### v0.1.0 (2021-01-07) * Regenerated using generator version 0.1.1 diff --git a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/classes.rb b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/classes.rb index 84f2e57f1..3d3484e2b 100644 --- a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/classes.rb +++ b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/classes.rb @@ -784,11 +784,6 @@ module Google class Binding include Google::Apis::Core::Hashable - # - # Corresponds to the JSON property `bindingId` - # @return [String] - attr_accessor :binding_id - # Represents a textual expression in the Common Expression Language (CEL) syntax. # CEL is a C-like expression language. The syntax and semantics of CEL are # documented at https://github.com/google/cel-spec. Example (Comparison): title: @@ -850,7 +845,6 @@ module Google # Update properties of this object def update!(**args) - @binding_id = args[:binding_id] if args.key?(:binding_id) @condition = args[:condition] if args.key?(:condition) @members = args[:members] if args.key?(:members) @role = args[:role] if args.key?(:role) @@ -1158,7 +1152,7 @@ module Google class ClusteringMetrics include Google::Apis::Core::Hashable - # [Beta] Information for all clusters. + # Information for all clusters. # Corresponds to the JSON property `clusters` # @return [Array] attr_accessor :clusters @@ -2202,7 +2196,7 @@ module Google # @return [Google::Apis::BigqueryV2::GoogleSheetsOptions] attr_accessor :google_sheets_options - # [Optional, Trusted Tester] Options to configure hive partitioning support. + # [Optional] Options to configure hive partitioning support. # Corresponds to the JSON property `hivePartitioningOptions` # @return [Google::Apis::BigqueryV2::HivePartitioningOptions] attr_accessor :hive_partitioning_options @@ -2944,23 +2938,24 @@ module Google # @return [String] attr_accessor :create_disposition - # [Trusted Tester] Defines the list of possible SQL data types to which the - # source decimal values are converted. This list and the precision and the scale - # parameters of the decimal field determine the target type. In the order of - # NUMERIC, BIGNUMERIC, and STRING, a type is picked if it is in the specified - # list and if it supports the precision and the scale. STRING supports all - # precision and scale values. If none of the listed types supports the precision - # and the scale, the type supporting the widest range in the specified list is - # picked, and if a value exceeds the supported range when reading the data, an - # error will be thrown. For example: suppose decimal_target_type = ["NUMERIC", " - # BIGNUMERIC"]. Then if (precision,scale) is: * (38,9) -> NUMERIC; * (39,9) -> - # BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38,10) -> BIGNUMERIC ( - # NUMERIC cannot hold 10 fractional digits); * (76,38) -> BIGNUMERIC; * (77,38) - - # > BIGNUMERIC (error if value exeeds supported range). For duplicated types in - # this field, only one will be considered and the rest will be ignored. The - # order of the types in this field is ignored. For example, ["BIGNUMERIC", " - # NUMERIC"] is the same as ["NUMERIC", "BIGNUMERIC"] and NUMERIC always takes - # precedence over BIGNUMERIC. + # Defines the list of possible SQL data types to which the source decimal values + # are converted. This list and the precision and the scale parameters of the + # decimal field determine the target type. In the order of NUMERIC, BIGNUMERIC ([ + # Preview](/products/#product-launch-stages)), and STRING, a type is picked if + # it is in the specified list and if it supports the precision and the scale. + # STRING supports all precision and scale values. If none of the listed types + # supports the precision and the scale, the type supporting the widest range in + # the specified list is picked, and if a value exceeds the supported range when + # reading the data, an error will be thrown. Example: Suppose the value of this + # field is ["NUMERIC", "BIGNUMERIC"]. If (precision,scale) is: * (38,9) -> + # NUMERIC; * (39,9) -> BIGNUMERIC (NUMERIC cannot hold 30 integer digits); * (38, + # 10) -> BIGNUMERIC (NUMERIC cannot hold 10 fractional digits); * (76,38) -> + # BIGNUMERIC; * (77,38) -> BIGNUMERIC (error if value exeeds supported range). + # This field cannot contain duplicate types. The order of the types in this + # field is ignored. For example, ["BIGNUMERIC", "NUMERIC"] is the same as [" + # NUMERIC", "BIGNUMERIC"] and NUMERIC always takes precedence over BIGNUMERIC. + # Defaults to ["NUMERIC", "STRING"] for ORC and ["NUMERIC"] for the other file + # formats. # Corresponds to the JSON property `decimalTargetTypes` # @return [Array] attr_accessor :decimal_target_types @@ -2999,7 +2994,7 @@ module Google # @return [String] attr_accessor :field_delimiter - # [Optional, Trusted Tester] Options to configure hive partitioning support. + # [Optional] Options to configure hive partitioning support. # Corresponds to the JSON property `hivePartitioningOptions` # @return [Google::Apis::BigqueryV2::HivePartitioningOptions] attr_accessor :hive_partitioning_options @@ -3016,6 +3011,14 @@ module Google attr_accessor :ignore_unknown_values alias_method :ignore_unknown_values?, :ignore_unknown_values + # [Optional] If sourceFormat is set to newline-delimited JSON, indicates whether + # it should be processed as a JSON variant such as GeoJSON. For a sourceFormat + # other than JSON, omit this field. If the sourceFormat is newline-delimited + # JSON: - for newline-delimited GeoJSON: set to GEOJSON. + # Corresponds to the JSON property `jsonExtension` + # @return [String] + attr_accessor :json_extension + # [Optional] The maximum number of bad records that BigQuery can ignore when # running the job. If the number of bad records exceeds this value, an invalid # error is returned in the job result. This is only valid for CSV and JSON. The @@ -3162,6 +3165,7 @@ module Google @field_delimiter = args[:field_delimiter] if args.key?(:field_delimiter) @hive_partitioning_options = args[:hive_partitioning_options] if args.key?(:hive_partitioning_options) @ignore_unknown_values = args[:ignore_unknown_values] if args.key?(:ignore_unknown_values) + @json_extension = args[:json_extension] if args.key?(:json_extension) @max_bad_records = args[:max_bad_records] if args.key?(:max_bad_records) @null_marker = args[:null_marker] if args.key?(:null_marker) @projection_fields = args[:projection_fields] if args.key?(:projection_fields) @@ -5212,7 +5216,7 @@ module Google # @return [Float] attr_accessor :median_absolute_error - # R^2 score. + # R^2 score. This corresponds to r2_score in ML.EVALUATE. # Corresponds to the JSON property `rSquared` # @return [Float] attr_accessor :r_squared @@ -6228,9 +6232,10 @@ module Google attr_accessor :policy_tags # [Required] The field data type. Possible values include STRING, BYTES, INTEGER, - # INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), BOOLEAN, BOOL (same - # as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD (where RECORD indicates - # that the field contains a nested schema) or STRUCT (same as RECORD). + # INT64 (same as INTEGER), FLOAT, FLOAT64 (same as FLOAT), NUMERIC, BIGNUMERIC, + # BOOLEAN, BOOL (same as BOOLEAN), TIMESTAMP, DATE, TIME, DATETIME, RECORD ( + # where RECORD indicates that the field contains a nested schema) or STRUCT ( + # same as RECORD). # Corresponds to the JSON property `type` # @return [String] attr_accessor :type @@ -6599,7 +6604,7 @@ module Google end end - # + # Options used in model training. class TrainingOptions include Google::Apis::Core::Hashable @@ -6773,8 +6778,8 @@ module Google # @return [Float] attr_accessor :min_split_loss - # [Beta] Google Cloud Storage URI from which the model was imported. Only - # applicable for imported models. + # Google Cloud Storage URI from which the model was imported. Only applicable + # for imported models. # Corresponds to the JSON property `modelUri` # @return [String] attr_accessor :model_uri @@ -6931,8 +6936,7 @@ module Google # @return [String] attr_accessor :start_time - # Options that were used for this training run, includes user specified and - # default options that were used. + # Options used in model training. # Corresponds to the JSON property `trainingOptions` # @return [Google::Apis::BigqueryV2::TrainingOptions] attr_accessor :training_options diff --git a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/gem_version.rb b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/gem_version.rb index bfd4437dd..04ca44cf4 100644 --- a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/gem_version.rb +++ b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/gem_version.rb @@ -16,13 +16,13 @@ module Google module Apis module BigqueryV2 # Version of the google-apis-bigquery_v2 gem - GEM_VERSION = "0.1.0" + GEM_VERSION = "0.2.0" # Version of the code generator used to generate this client GENERATOR_VERSION = "0.1.1" # Revision of the discovery document this client was generated from - REVISION = "20201030" + REVISION = "20210104" end end end diff --git a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/representations.rb b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/representations.rb index 7c8a24306..b87455ff8 100644 --- a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/representations.rb +++ b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/representations.rb @@ -1024,7 +1024,6 @@ module Google class Binding # @private class Representation < Google::Apis::Core::JsonRepresentation - property :binding_id, as: 'bindingId' property :condition, as: 'condition', class: Google::Apis::BigqueryV2::Expr, decorator: Google::Apis::BigqueryV2::Expr::Representation collection :members, as: 'members' @@ -1553,6 +1552,7 @@ module Google property :hive_partitioning_options, as: 'hivePartitioningOptions', class: Google::Apis::BigqueryV2::HivePartitioningOptions, decorator: Google::Apis::BigqueryV2::HivePartitioningOptions::Representation property :ignore_unknown_values, as: 'ignoreUnknownValues' + property :json_extension, as: 'jsonExtension' property :max_bad_records, as: 'maxBadRecords' property :null_marker, as: 'nullMarker' collection :projection_fields, as: 'projectionFields' diff --git a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/service.rb b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/service.rb index 9bf013fd0..a236fdd87 100644 --- a/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/service.rb +++ b/generated/google-apis-bigquery_v2/lib/google/apis/bigquery_v2/service.rb @@ -1030,6 +1030,44 @@ module Google execute_or_queue_command(command, &block) end + # Gets the access control policy for a resource. Returns an empty policy if the + # resource exists and does not have a policy set. + # @param [String] resource + # REQUIRED: The resource for which the policy is being requested. See the + # operation documentation for the appropriate value for this field. + # @param [Google::Apis::BigqueryV2::GetIamPolicyRequest] get_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def get_row_access_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{+resource}:getIamPolicy', options) + command.request_representation = Google::Apis::BigqueryV2::GetIamPolicyRequest::Representation + command.request_object = get_iam_policy_request_object + command.response_representation = Google::Apis::BigqueryV2::Policy::Representation + command.response_class = Google::Apis::BigqueryV2::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Lists all row access policies on the specified table. # @param [String] project_id # Required. Project ID of the row access policies to list. @@ -1076,6 +1114,86 @@ module Google execute_or_queue_command(command, &block) end + # Sets the access control policy on the specified resource. Replaces any + # existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and ` + # PERMISSION_DENIED` errors. + # @param [String] resource + # REQUIRED: The resource for which the policy is being specified. See the + # operation documentation for the appropriate value for this field. + # @param [Google::Apis::BigqueryV2::SetIamPolicyRequest] set_iam_policy_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::Policy] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::Policy] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def set_row_access_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{+resource}:setIamPolicy', options) + command.request_representation = Google::Apis::BigqueryV2::SetIamPolicyRequest::Representation + command.request_object = set_iam_policy_request_object + command.response_representation = Google::Apis::BigqueryV2::Policy::Representation + command.response_class = Google::Apis::BigqueryV2::Policy + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + + # Returns permissions that a caller has on the specified resource. If the + # resource does not exist, this will return an empty set of permissions, not a ` + # NOT_FOUND` error. Note: This operation is designed to be used for building + # permission-aware UIs and command-line tools, not for authorization checking. + # This operation may "fail open" without warning. + # @param [String] resource + # REQUIRED: The resource for which the policy detail is being requested. See the + # operation documentation for the appropriate value for this field. + # @param [Google::Apis::BigqueryV2::TestIamPermissionsRequest] test_iam_permissions_request_object + # @param [String] fields + # Selector specifying which fields to include in a partial response. + # @param [String] quota_user + # An opaque string that represents a user for quota purposes. Must not exceed 40 + # characters. + # @param [String] user_ip + # Deprecated. Please use quotaUser instead. + # @param [Google::Apis::RequestOptions] options + # Request-specific options + # + # @yield [result, err] Result & error if block supplied + # @yieldparam result [Google::Apis::BigqueryV2::TestIamPermissionsResponse] parsed result object + # @yieldparam err [StandardError] error object if request failed + # + # @return [Google::Apis::BigqueryV2::TestIamPermissionsResponse] + # + # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried + # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification + # @raise [Google::Apis::AuthorizationError] Authorization is required + def test_row_access_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) + command = make_simple_command(:post, '{+resource}:testIamPermissions', options) + command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation + command.request_object = test_iam_permissions_request_object + command.response_representation = Google::Apis::BigqueryV2::TestIamPermissionsResponse::Representation + command.response_class = Google::Apis::BigqueryV2::TestIamPermissionsResponse + command.params['resource'] = resource unless resource.nil? + command.query['fields'] = fields unless fields.nil? + command.query['quotaUser'] = quota_user unless quota_user.nil? + command.query['userIp'] = user_ip unless user_ip.nil? + execute_or_queue_command(command, &block) + end + # Streams data into BigQuery one record at a time without needing to run a load # job. Requires the WRITER dataset role. # @param [String] project_id diff --git a/generated/google-apis-bigquery_v2/synth.metadata b/generated/google-apis-bigquery_v2/synth.metadata index 10402426d..d5f955f0d 100644 --- a/generated/google-apis-bigquery_v2/synth.metadata +++ b/generated/google-apis-bigquery_v2/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/google-api-ruby-client.git", - "sha": "a98ff78fa110f58ba38da0cc1291f35c55f96c9f" + "sha": "8fcea6747fbcee2f5efd17b827f5b5c59e867c49" } } ]