Packages
google_api_big_query
0.6.0
0.88.0
0.87.1
0.87.0
0.86.1
0.86.0
0.85.0
0.84.2
0.84.1
0.84.0
0.83.0
0.82.0
0.81.0
0.80.0
0.79.0
0.78.0
0.77.0
0.76.0
0.75.0
0.74.0
0.73.0
0.72.0
0.71.0
0.70.1
0.70.0
0.69.0
0.68.0
0.67.0
0.66.1
0.66.0
0.65.0
0.64.0
0.63.0
0.62.0
0.61.1
0.61.0
0.60.0
0.59.0
0.58.0
0.57.0
0.56.0
0.55.0
0.54.0
0.53.0
0.52.0
0.51.0
0.50.0
0.49.0
0.48.0
0.47.0
0.46.0
0.45.0
0.44.0
0.43.0
0.42.0
0.41.0
0.40.0
0.39.0
0.38.0
0.37.0
0.36.0
0.35.0
0.34.0
0.33.0
0.32.0
0.31.0
0.30.0
0.29.0
0.28.0
0.27.0
0.26.0
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.19.0
0.18.0
0.17.0
0.16.0
0.15.0
0.13.0
0.12.0
0.9.0
0.8.0
0.7.0
0.6.0
0.4.0
0.3.0
0.2.0
0.1.0
0.0.1
BigQuery API client library. A data platform for customers to create, manage, share and query data.
Current section
92 Versions
Jump to
Current section
92 Versions
Compare versions
40
files changed
+1723
additions
-71
deletions
| @@ -8,17 +8,27 @@ | |
| 8 8 | <<"lib/google_api/big_query/v2">>,<<"lib/google_api/big_query/v2/api">>, |
| 9 9 | <<"lib/google_api/big_query/v2/api/datasets.ex">>, |
| 10 10 | <<"lib/google_api/big_query/v2/api/jobs.ex">>, |
| 11 | + <<"lib/google_api/big_query/v2/api/models.ex">>, |
| 11 12 | <<"lib/google_api/big_query/v2/api/projects.ex">>, |
| 12 13 | <<"lib/google_api/big_query/v2/api/tabledata.ex">>, |
| 13 14 | <<"lib/google_api/big_query/v2/api/tables.ex">>, |
| 14 15 | <<"lib/google_api/big_query/v2/connection.ex">>, |
| 15 16 | <<"lib/google_api/big_query/v2/deserializer.ex">>, |
| 16 17 | <<"lib/google_api/big_query/v2/model">>, |
| 18 | + <<"lib/google_api/big_query/v2/model/aggregate_classification_metrics.ex">>, |
| 17 19 | <<"lib/google_api/big_query/v2/model/big_query_model_training.ex">>, |
| 18 20 | <<"lib/google_api/big_query/v2/model/bigtable_column.ex">>, |
| 19 21 | <<"lib/google_api/big_query/v2/model/bigtable_column_family.ex">>, |
| 20 22 | <<"lib/google_api/big_query/v2/model/bigtable_options.ex">>, |
| 23 | + <<"lib/google_api/big_query/v2/model/binary_classification_metrics.ex">>, |
| 24 | + <<"lib/google_api/big_query/v2/model/binary_confusion_matrix.ex">>, |
| 25 | + <<"lib/google_api/big_query/v2/model/bqml_iteration_result.ex">>, |
| 26 | + <<"lib/google_api/big_query/v2/model/bqml_training_run.ex">>, |
| 27 | + <<"lib/google_api/big_query/v2/model/bqml_training_run_training_options.ex">>, |
| 28 | + <<"lib/google_api/big_query/v2/model/cluster_info.ex">>, |
| 21 29 | <<"lib/google_api/big_query/v2/model/clustering.ex">>, |
| 30 | + <<"lib/google_api/big_query/v2/model/clustering_metrics.ex">>, |
| 31 | + <<"lib/google_api/big_query/v2/model/confusion_matrix.ex">>, |
| 22 32 | <<"lib/google_api/big_query/v2/model/csv_options.ex">>, |
| 23 33 | <<"lib/google_api/big_query/v2/model/dataset.ex">>, |
| 24 34 | <<"lib/google_api/big_query/v2/model/dataset_access.ex">>, |
| @@ -27,7 +37,9 @@ | |
| 27 37 | <<"lib/google_api/big_query/v2/model/dataset_reference.ex">>, |
| 28 38 | <<"lib/google_api/big_query/v2/model/destination_table_properties.ex">>, |
| 29 39 | <<"lib/google_api/big_query/v2/model/encryption_configuration.ex">>, |
| 40 | + <<"lib/google_api/big_query/v2/model/entry.ex">>, |
| 30 41 | <<"lib/google_api/big_query/v2/model/error_proto.ex">>, |
| 42 | + <<"lib/google_api/big_query/v2/model/evaluation_metrics.ex">>, |
| 31 43 | <<"lib/google_api/big_query/v2/model/explain_query_stage.ex">>, |
| 32 44 | <<"lib/google_api/big_query/v2/model/explain_query_step.ex">>, |
| 33 45 | <<"lib/google_api/big_query/v2/model/external_data_configuration.ex">>, |
| @@ -54,9 +66,13 @@ | |
| 54 66 | <<"lib/google_api/big_query/v2/model/job_status.ex">>, |
| 55 67 | <<"lib/google_api/big_query/v2/model/json_object.ex">>, |
| 56 68 | <<"lib/google_api/big_query/v2/model/json_value.ex">>, |
| 69 | + <<"lib/google_api/big_query/v2/model/list_models_response.ex">>, |
| 57 70 | <<"lib/google_api/big_query/v2/model/materialized_view_definition.ex">>, |
| 71 | + <<"lib/google_api/big_query/v2/model/model.ex">>, |
| 58 72 | <<"lib/google_api/big_query/v2/model/model_definition.ex">>, |
| 59 73 | <<"lib/google_api/big_query/v2/model/model_definition_model_options.ex">>, |
| 74 | + <<"lib/google_api/big_query/v2/model/model_reference.ex">>, |
| 75 | + <<"lib/google_api/big_query/v2/model/multi_class_classification_metrics.ex">>, |
| 60 76 | <<"lib/google_api/big_query/v2/model/project_list.ex">>, |
| 61 77 | <<"lib/google_api/big_query/v2/model/project_list_projects.ex">>, |
| 62 78 | <<"lib/google_api/big_query/v2/model/project_reference.ex">>, |
| @@ -69,6 +85,12 @@ | |
| 69 85 | <<"lib/google_api/big_query/v2/model/query_timeline_sample.ex">>, |
| 70 86 | <<"lib/google_api/big_query/v2/model/range_partitioning.ex">>, |
| 71 87 | <<"lib/google_api/big_query/v2/model/range_partitioning_range.ex">>, |
| 88 | + <<"lib/google_api/big_query/v2/model/regression_metrics.ex">>, |
| 89 | + <<"lib/google_api/big_query/v2/model/routine_reference.ex">>, |
| 90 | + <<"lib/google_api/big_query/v2/model/row.ex">>, |
| 91 | + <<"lib/google_api/big_query/v2/model/standard_sql_data_type.ex">>, |
| 92 | + <<"lib/google_api/big_query/v2/model/standard_sql_field.ex">>, |
| 93 | + <<"lib/google_api/big_query/v2/model/standard_sql_struct_type.ex">>, |
| 72 94 | <<"lib/google_api/big_query/v2/model/streamingbuffer.ex">>, |
| 73 95 | <<"lib/google_api/big_query/v2/model/table.ex">>, |
| 74 96 | <<"lib/google_api/big_query/v2/model/table_cell.ex">>, |
| @@ -78,6 +100,7 @@ | |
| 78 100 | <<"lib/google_api/big_query/v2/model/table_data_insert_all_response_insert_errors.ex">>, |
| 79 101 | <<"lib/google_api/big_query/v2/model/table_data_list.ex">>, |
| 80 102 | <<"lib/google_api/big_query/v2/model/table_field_schema.ex">>, |
| 103 | + <<"lib/google_api/big_query/v2/model/table_field_schema_categories.ex">>, |
| 81 104 | <<"lib/google_api/big_query/v2/model/table_list.ex">>, |
| 82 105 | <<"lib/google_api/big_query/v2/model/table_list_tables.ex">>, |
| 83 106 | <<"lib/google_api/big_query/v2/model/table_list_view.ex">>, |
| @@ -85,6 +108,7 @@ | |
| 85 108 | <<"lib/google_api/big_query/v2/model/table_row.ex">>, |
| 86 109 | <<"lib/google_api/big_query/v2/model/table_schema.ex">>, |
| 87 110 | <<"lib/google_api/big_query/v2/model/time_partitioning.ex">>, |
| 111 | + <<"lib/google_api/big_query/v2/model/training_options.ex">>, |
| 88 112 | <<"lib/google_api/big_query/v2/model/training_run.ex">>, |
| 89 113 | <<"lib/google_api/big_query/v2/model/training_run_training_options.ex">>, |
| 90 114 | <<"lib/google_api/big_query/v2/model/user_defined_function_resource.ex">>, |
| @@ -103,4 +127,4 @@ | |
| 103 127 | {<<"optional">>,false}, |
| 104 128 | {<<"repository">>,<<"hexpm">>}, |
| 105 129 | {<<"requirement">>,<<"~> 0.1.0">>}]]}. |
| 106 | - {<<"version">>,<<"0.4.0">>}. |
| 130 | + {<<"version">>,<<"0.6.0">>}. |
| @@ -71,8 +71,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 71 71 | Request.new() |
| 72 72 | |> Request.method(:delete) |
| 73 73 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets/{datasetId}", %{ |
| 74 | - "projectId" => URI.encode_www_form(project_id), |
| 75 | - "datasetId" => URI.encode_www_form(dataset_id) |
| 74 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 75 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1) |
| 76 76 | }) |
| 77 77 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 78 78 | |
| @@ -120,8 +120,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 120 120 | Request.new() |
| 121 121 | |> Request.method(:get) |
| 122 122 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets/{datasetId}", %{ |
| 123 | - "projectId" => URI.encode_www_form(project_id), |
| 124 | - "datasetId" => URI.encode_www_form(dataset_id) |
| 123 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 124 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1) |
| 125 125 | }) |
| 126 126 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 127 127 | |
| @@ -170,7 +170,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 170 170 | Request.new() |
| 171 171 | |> Request.method(:post) |
| 172 172 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets", %{ |
| 173 | - "projectId" => URI.encode_www_form(project_id) |
| 173 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 174 174 | }) |
| 175 175 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 176 176 | |
| @@ -225,7 +225,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 225 225 | Request.new() |
| 226 226 | |> Request.method(:get) |
| 227 227 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets", %{ |
| 228 | - "projectId" => URI.encode_www_form(project_id) |
| 228 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 229 229 | }) |
| 230 230 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 231 231 | |
| @@ -281,8 +281,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 281 281 | Request.new() |
| 282 282 | |> Request.method(:patch) |
| 283 283 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets/{datasetId}", %{ |
| 284 | - "projectId" => URI.encode_www_form(project_id), |
| 285 | - "datasetId" => URI.encode_www_form(dataset_id) |
| 284 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 285 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1) |
| 286 286 | }) |
| 287 287 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 288 288 | |
| @@ -338,8 +338,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Datasets do | |
| 338 338 | Request.new() |
| 339 339 | |> Request.method(:put) |
| 340 340 | |> Request.url("/bigquery/v2/projects/{projectId}/datasets/{datasetId}", %{ |
| 341 | - "projectId" => URI.encode_www_form(project_id), |
| 342 | - "datasetId" => URI.encode_www_form(dataset_id) |
| 341 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 342 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1) |
| 343 343 | }) |
| 344 344 | |> Request.add_optional_params(optional_params_config, optional_params) |
| @@ -65,8 +65,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 65 65 | Request.new() |
| 66 66 | |> Request.method(:post) |
| 67 67 | |> Request.url("/bigquery/v2/projects/{projectId}/jobs/{jobId}/cancel", %{ |
| 68 | - "projectId" => URI.encode_www_form(project_id), |
| 69 | - "jobId" => URI.encode_www_form(job_id) |
| 68 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 69 | + "jobId" => URI.encode(job_id, &URI.char_unreserved?/1) |
| 70 70 | }) |
| 71 71 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 72 72 | |
| @@ -116,8 +116,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 116 116 | Request.new() |
| 117 117 | |> Request.method(:get) |
| 118 118 | |> Request.url("/bigquery/v2/projects/{projectId}/jobs/{jobId}", %{ |
| 119 | - "projectId" => URI.encode_www_form(project_id), |
| 120 | - "jobId" => URI.encode_www_form(job_id) |
| 119 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 120 | + "jobId" => URI.encode(job_id, &URI.char_unreserved?/1) |
| 121 121 | }) |
| 122 122 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 123 123 | |
| @@ -181,8 +181,8 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 181 181 | Request.new() |
| 182 182 | |> Request.method(:get) |
| 183 183 | |> Request.url("/bigquery/v2/projects/{projectId}/queries/{jobId}", %{ |
| 184 | - "projectId" => URI.encode_www_form(project_id), |
| 185 | - "jobId" => URI.encode_www_form(job_id) |
| 184 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 185 | + "jobId" => URI.encode(job_id, &URI.char_unreserved?/1) |
| 186 186 | }) |
| 187 187 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 188 188 | |
| @@ -231,7 +231,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 231 231 | Request.new() |
| 232 232 | |> Request.method(:post) |
| 233 233 | |> Request.url("/bigquery/v2/projects/{projectId}/jobs", %{ |
| 234 | - "projectId" => URI.encode_www_form(project_id) |
| 234 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 235 235 | }) |
| 236 236 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 237 237 | |
| @@ -287,7 +287,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 287 287 | Request.new() |
| 288 288 | |> Request.method(:post) |
| 289 289 | |> Request.url("/resumable/upload/bigquery/v2/projects/{projectId}/jobs", %{ |
| 290 | - "projectId" => URI.encode_www_form(project_id) |
| 290 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 291 291 | }) |
| 292 292 | |> Request.add_param(:query, :uploadType, upload_type) |
| 293 293 | |> Request.add_optional_params(optional_params_config, optional_params) |
| @@ -352,7 +352,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 352 352 | Request.new() |
| 353 353 | |> Request.method(:post) |
| 354 354 | |> Request.url("/upload/bigquery/v2/projects/{projectId}/jobs", %{ |
| 355 | - "projectId" => URI.encode_www_form(project_id) |
| 355 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 356 356 | }) |
| 357 357 | |> Request.add_param(:query, :uploadType, upload_type) |
| 358 358 | |> Request.add_param(:body, :metadata, metadata) |
| @@ -416,7 +416,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 416 416 | Request.new() |
| 417 417 | |> Request.method(:get) |
| 418 418 | |> Request.url("/bigquery/v2/projects/{projectId}/jobs", %{ |
| 419 | - "projectId" => URI.encode_www_form(project_id) |
| 419 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 420 420 | }) |
| 421 421 | |> Request.add_optional_params(optional_params_config, optional_params) |
| 422 422 | |
| @@ -465,7 +465,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Jobs do | |
| 465 465 | Request.new() |
| 466 466 | |> Request.method(:post) |
| 467 467 | |> Request.url("/bigquery/v2/projects/{projectId}/queries", %{ |
| 468 | - "projectId" => URI.encode_www_form(project_id) |
| 468 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 469 469 | }) |
| 470 470 | |> Request.add_optional_params(optional_params_config, optional_params) |
| @@ -0,0 +1,264 @@ | |
| 1 | + # Copyright 2017 Google Inc. |
| 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 | + # NOTE: This class is auto generated by the swagger code generator program. |
| 16 | + # https://github.com/swagger-api/swagger-codegen.git |
| 17 | + # Do not edit the class manually. |
| 18 | + |
| 19 | + defmodule GoogleApi.BigQuery.V2.Api.Models do |
| 20 | + @moduledoc """ |
| 21 | + API calls for all endpoints tagged `Models`. |
| 22 | + """ |
| 23 | + |
| 24 | + alias GoogleApi.BigQuery.V2.Connection |
| 25 | + alias GoogleApi.Gax.{Request, Response} |
| 26 | + |
| 27 | + @doc """ |
| 28 | + Deletes the model specified by modelId from the dataset. |
| 29 | + |
| 30 | + ## Parameters |
| 31 | + |
| 32 | + - connection (GoogleApi.BigQuery.V2.Connection): Connection to server |
| 33 | + - project_id (String.t): Project ID of the model to delete. |
| 34 | + - dataset_id (String.t): Dataset ID of the model to delete. |
| 35 | + - model_id (String.t): Model ID of the model to delete. |
| 36 | + - optional_params (KeywordList): [optional] Optional parameters |
| 37 | + - :alt (String.t): Data format for the response. |
| 38 | + - :fields (String.t): Selector specifying which fields to include in a partial response. |
| 39 | + - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. |
| 40 | + - :oauth_token (String.t): OAuth 2.0 token for the current user. |
| 41 | + - :prettyPrint (boolean()): Returns response with indentations and line breaks. |
| 42 | + - :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters. |
| 43 | + - :userIp (String.t): Deprecated. Please use quotaUser instead. |
| 44 | + |
| 45 | + ## Returns |
| 46 | + |
| 47 | + {:ok, %{}} on success |
| 48 | + {:error, info} on failure |
| 49 | + """ |
| 50 | + @spec bigquery_models_delete(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: |
| 51 | + {:ok, nil} | {:error, Tesla.Env.t()} |
| 52 | + def bigquery_models_delete( |
| 53 | + connection, |
| 54 | + project_id, |
| 55 | + dataset_id, |
| 56 | + model_id, |
| 57 | + optional_params \\ [], |
| 58 | + opts \\ [] |
| 59 | + ) do |
| 60 | + optional_params_config = %{ |
| 61 | + :alt => :query, |
| 62 | + :fields => :query, |
| 63 | + :key => :query, |
| 64 | + :oauth_token => :query, |
| 65 | + :prettyPrint => :query, |
| 66 | + :quotaUser => :query, |
| 67 | + :userIp => :query |
| 68 | + } |
| 69 | + |
| 70 | + request = |
| 71 | + Request.new() |
| 72 | + |> Request.method(:delete) |
| 73 | + |> Request.url( |
| 74 | + "/bigquery/v2/projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}", |
| 75 | + %{ |
| 76 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 77 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1), |
| 78 | + "modelId" => URI.encode(model_id, &URI.char_unreserved?/1) |
| 79 | + } |
| 80 | + ) |
| 81 | + |> Request.add_optional_params(optional_params_config, optional_params) |
| 82 | + |
| 83 | + connection |
| 84 | + |> Connection.execute(request) |
| 85 | + |> Response.decode(opts ++ [decode: false]) |
| 86 | + end |
| 87 | + |
| 88 | + @doc """ |
| 89 | + Gets the specified model resource by model ID. |
| 90 | + |
| 91 | + ## Parameters |
| 92 | + |
| 93 | + - connection (GoogleApi.BigQuery.V2.Connection): Connection to server |
| 94 | + - project_id (String.t): Project ID of the requested model. |
| 95 | + - dataset_id (String.t): Dataset ID of the requested model. |
| 96 | + - model_id (String.t): Model ID of the requested model. |
| 97 | + - optional_params (KeywordList): [optional] Optional parameters |
| 98 | + - :alt (String.t): Data format for the response. |
| 99 | + - :fields (String.t): Selector specifying which fields to include in a partial response. |
| 100 | + - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. |
| 101 | + - :oauth_token (String.t): OAuth 2.0 token for the current user. |
| 102 | + - :prettyPrint (boolean()): Returns response with indentations and line breaks. |
| 103 | + - :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters. |
| 104 | + - :userIp (String.t): Deprecated. Please use quotaUser instead. |
| 105 | + |
| 106 | + ## Returns |
| 107 | + |
| 108 | + {:ok, %GoogleApi.BigQuery.V2.Model.Model{}} on success |
| 109 | + {:error, info} on failure |
| 110 | + """ |
| 111 | + @spec bigquery_models_get(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: |
| 112 | + {:ok, GoogleApi.BigQuery.V2.Model.Model.t()} | {:error, Tesla.Env.t()} |
| 113 | + def bigquery_models_get( |
| 114 | + connection, |
| 115 | + project_id, |
| 116 | + dataset_id, |
| 117 | + model_id, |
| 118 | + optional_params \\ [], |
| 119 | + opts \\ [] |
| 120 | + ) do |
| 121 | + optional_params_config = %{ |
| 122 | + :alt => :query, |
| 123 | + :fields => :query, |
| 124 | + :key => :query, |
| 125 | + :oauth_token => :query, |
| 126 | + :prettyPrint => :query, |
| 127 | + :quotaUser => :query, |
| 128 | + :userIp => :query |
| 129 | + } |
| 130 | + |
| 131 | + request = |
| 132 | + Request.new() |
| 133 | + |> Request.method(:get) |
| 134 | + |> Request.url( |
| 135 | + "/bigquery/v2/projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}", |
| 136 | + %{ |
| 137 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 138 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1), |
| 139 | + "modelId" => URI.encode(model_id, &URI.char_unreserved?/1) |
| 140 | + } |
| 141 | + ) |
| 142 | + |> Request.add_optional_params(optional_params_config, optional_params) |
| 143 | + |
| 144 | + connection |
| 145 | + |> Connection.execute(request) |
| 146 | + |> Response.decode(opts ++ [struct: %GoogleApi.BigQuery.V2.Model.Model{}]) |
| 147 | + end |
| 148 | + |
| 149 | + @doc """ |
| 150 | + Lists all models in the specified dataset. Requires the READER dataset role. |
| 151 | + |
| 152 | + ## Parameters |
| 153 | + |
| 154 | + - connection (GoogleApi.BigQuery.V2.Connection): Connection to server |
| 155 | + - project_id (String.t): Project ID of the models to list. |
| 156 | + - dataset_id (String.t): Dataset ID of the models to list. |
| 157 | + - optional_params (KeywordList): [optional] Optional parameters |
| 158 | + - :alt (String.t): Data format for the response. |
| 159 | + - :fields (String.t): Selector specifying which fields to include in a partial response. |
| 160 | + - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. |
| 161 | + - :oauth_token (String.t): OAuth 2.0 token for the current user. |
| 162 | + - :prettyPrint (boolean()): Returns response with indentations and line breaks. |
| 163 | + - :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters. |
| 164 | + - :userIp (String.t): Deprecated. Please use quotaUser instead. |
| 165 | + - :maxResults (integer()): The maximum number of results per page. |
| 166 | + - :pageToken (String.t): Page token, returned by a previous call to request the next page of results |
| 167 | + |
| 168 | + ## Returns |
| 169 | + |
| 170 | + {:ok, %GoogleApi.BigQuery.V2.Model.ListModelsResponse{}} on success |
| 171 | + {:error, info} on failure |
| 172 | + """ |
| 173 | + @spec bigquery_models_list(Tesla.Env.client(), String.t(), String.t(), keyword()) :: |
| 174 | + {:ok, GoogleApi.BigQuery.V2.Model.ListModelsResponse.t()} | {:error, Tesla.Env.t()} |
| 175 | + def bigquery_models_list(connection, project_id, dataset_id, optional_params \\ [], opts \\ []) do |
| 176 | + optional_params_config = %{ |
| 177 | + :alt => :query, |
| 178 | + :fields => :query, |
| 179 | + :key => :query, |
| 180 | + :oauth_token => :query, |
| 181 | + :prettyPrint => :query, |
| 182 | + :quotaUser => :query, |
| 183 | + :userIp => :query, |
| 184 | + :maxResults => :query, |
| 185 | + :pageToken => :query |
| 186 | + } |
| 187 | + |
| 188 | + request = |
| 189 | + Request.new() |
| 190 | + |> Request.method(:get) |
| 191 | + |> Request.url("/bigquery/v2/projects/{+projectId}/datasets/{+datasetId}/models", %{ |
| 192 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 193 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1) |
| 194 | + }) |
| 195 | + |> Request.add_optional_params(optional_params_config, optional_params) |
| 196 | + |
| 197 | + connection |
| 198 | + |> Connection.execute(request) |
| 199 | + |> Response.decode(opts ++ [struct: %GoogleApi.BigQuery.V2.Model.ListModelsResponse{}]) |
| 200 | + end |
| 201 | + |
| 202 | + @doc """ |
| 203 | + Patch specific fields in the specified model. |
| 204 | + |
| 205 | + ## Parameters |
| 206 | + |
| 207 | + - connection (GoogleApi.BigQuery.V2.Connection): Connection to server |
| 208 | + - project_id (String.t): Project ID of the model to patch. |
| 209 | + - dataset_id (String.t): Dataset ID of the model to patch. |
| 210 | + - model_id (String.t): Model ID of the model to patch. |
| 211 | + - optional_params (KeywordList): [optional] Optional parameters |
| 212 | + - :alt (String.t): Data format for the response. |
| 213 | + - :fields (String.t): Selector specifying which fields to include in a partial response. |
| 214 | + - :key (String.t): API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token. |
| 215 | + - :oauth_token (String.t): OAuth 2.0 token for the current user. |
| 216 | + - :prettyPrint (boolean()): Returns response with indentations and line breaks. |
| 217 | + - :quotaUser (String.t): An opaque string that represents a user for quota purposes. Must not exceed 40 characters. |
| 218 | + - :userIp (String.t): Deprecated. Please use quotaUser instead. |
| 219 | + - :body (Model): |
| 220 | + |
| 221 | + ## Returns |
| 222 | + |
| 223 | + {:ok, %GoogleApi.BigQuery.V2.Model.Model{}} on success |
| 224 | + {:error, info} on failure |
| 225 | + """ |
| 226 | + @spec bigquery_models_patch(Tesla.Env.client(), String.t(), String.t(), String.t(), keyword()) :: |
| 227 | + {:ok, GoogleApi.BigQuery.V2.Model.Model.t()} | {:error, Tesla.Env.t()} |
| 228 | + def bigquery_models_patch( |
| 229 | + connection, |
| 230 | + project_id, |
| 231 | + dataset_id, |
| 232 | + model_id, |
| 233 | + optional_params \\ [], |
| 234 | + opts \\ [] |
| 235 | + ) do |
| 236 | + optional_params_config = %{ |
| 237 | + :alt => :query, |
| 238 | + :fields => :query, |
| 239 | + :key => :query, |
| 240 | + :oauth_token => :query, |
| 241 | + :prettyPrint => :query, |
| 242 | + :quotaUser => :query, |
| 243 | + :userIp => :query, |
| 244 | + :body => :body |
| 245 | + } |
| 246 | + |
| 247 | + request = |
| 248 | + Request.new() |
| 249 | + |> Request.method(:patch) |
| 250 | + |> Request.url( |
| 251 | + "/bigquery/v2/projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}", |
| 252 | + %{ |
| 253 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1), |
| 254 | + "datasetId" => URI.encode(dataset_id, &URI.char_unreserved?/1), |
| 255 | + "modelId" => URI.encode(model_id, &URI.char_unreserved?/1) |
| 256 | + } |
| 257 | + ) |
| 258 | + |> Request.add_optional_params(optional_params_config, optional_params) |
| 259 | + |
| 260 | + connection |
| 261 | + |> Connection.execute(request) |
| 262 | + |> Response.decode(opts ++ [struct: %GoogleApi.BigQuery.V2.Model.Model{}]) |
| 263 | + end |
| 264 | + end |
| @@ -68,7 +68,7 @@ defmodule GoogleApi.BigQuery.V2.Api.Projects do | |
| 68 68 | Request.new() |
| 69 69 | |> Request.method(:get) |
| 70 70 | |> Request.url("/bigquery/v2/projects/{projectId}/serviceAccount", %{ |
| 71 | - "projectId" => URI.encode_www_form(project_id) |
| 71 | + "projectId" => URI.encode(project_id, &URI.char_unreserved?/1) |
| 72 72 | }) |
| 73 73 | |> Request.add_optional_params(optional_params_config, optional_params) |
Loading more files…