From bbc374fa22f9703fd536cb463846dbb749d351bf Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 00:56:12 +0000 Subject: [PATCH] feat: Automated regeneration of Composer client --- .../google_api/composer/v1/api/projects.ex | 1560 ++++++++++++++++- .../lib/google_api/composer/v1/metadata.ex | 2 +- ...irflow_metadata_retention_policy_config.ex | 49 + .../model/cloud_data_lineage_integration.ex | 46 + .../composer/v1/model/composer_workload.ex | 52 + .../v1/model/composer_workload_status.ex | 52 + .../v1/model/dag_processor_resource.ex | 55 + .../v1/model/data_retention_config.ex | 54 + .../composer/v1/model/database_config.ex | 5 +- .../v1/model/database_failover_request.ex | 41 + .../v1/model/database_failover_response.ex | 41 + .../composer/v1/model/environment.ex | 6 + .../composer/v1/model/environment_config.ex | 12 + .../model/execute_airflow_command_request.ex | 52 + .../model/execute_airflow_command_response.ex | 55 + .../google_api/composer/v1/model/exit_info.ex | 49 + .../fetch_database_properties_response.ex | 52 + .../lib/google_api/composer/v1/model/line.ex | 49 + ...ist_user_workloads_config_maps_response.ex | 54 + .../list_user_workloads_secrets_response.ex | 49 + .../v1/model/list_workloads_response.ex | 49 + .../v1/model/load_snapshot_request.ex | 58 + .../composer/v1/model/node_config.ex | 8 +- .../google_api/composer/v1/model/operation.ex | 2 +- .../v1/model/poll_airflow_command_request.ex | 55 + .../v1/model/poll_airflow_command_response.ex | 52 + .../v1/model/private_environment_config.ex | 3 + .../composer/v1/model/recovery_config.ex | 47 + .../v1/model/save_snapshot_request.ex | 46 + .../v1/model/scheduled_snapshots_config.ex | 55 + .../composer/v1/model/software_config.ex | 9 +- .../v1/model/stop_airflow_command_request.ex | 55 + .../v1/model/stop_airflow_command_response.ex | 49 + .../composer/v1/model/storage_config.ex | 46 + .../v1/model/task_logs_retention_config.ex | 46 + .../composer/v1/model/triggerer_resource.ex | 52 + .../v1/model/user_workloads_config_map.ex | 49 + .../v1/model/user_workloads_secret.ex | 49 + .../composer/v1/model/workloads_config.ex | 6 + .../composer/v1beta1/api/projects.ex | 1414 ++++++++++++++- .../google_api/composer/v1beta1/metadata.ex | 2 +- ...irflow_metadata_retention_policy_config.ex | 49 + .../v1beta1/model/composer_workload.ex | 52 + .../v1beta1/model/composer_workload_status.ex | 52 + .../v1beta1/model/dag_processor_resource.ex | 55 + .../v1beta1/model/data_retention_config.ex | 58 + .../composer/v1beta1/model/database_config.ex | 5 +- .../model/database_failover_request.ex | 41 + .../model/database_failover_response.ex | 41 + .../composer/v1beta1/model/environment.ex | 6 + .../v1beta1/model/environment_config.ex | 9 + .../model/execute_airflow_command_request.ex | 52 + .../fetch_database_properties_response.ex | 52 + ...ist_user_workloads_config_maps_response.ex | 54 + .../list_user_workloads_secrets_response.ex | 54 + .../v1beta1/model/list_workloads_response.ex | 49 + .../composer/v1beta1/model/node_config.ex | 8 +- .../composer/v1beta1/model/operation.ex | 2 +- .../model/poll_airflow_command_request.ex | 55 + .../model/private_environment_config.ex | 3 + .../composer/v1beta1/model/software_config.ex | 5 +- .../model/stop_airflow_command_request.ex | 55 + .../model/stop_airflow_command_response.ex | 49 + .../composer/v1beta1/model/storage_config.ex | 46 + .../model/task_logs_retention_config.ex | 46 + .../model/user_workloads_config_map.ex | 49 + .../v1beta1/model/user_workloads_secret.ex | 49 + .../v1beta1/model/workloads_config.ex | 3 + 68 files changed, 5444 insertions(+), 42 deletions(-) create mode 100644 clients/composer/lib/google_api/composer/v1/model/airflow_metadata_retention_policy_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/cloud_data_lineage_integration.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/composer_workload.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/composer_workload_status.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/dag_processor_resource.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/data_retention_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/database_failover_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/database_failover_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/exit_info.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/fetch_database_properties_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/line.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/list_user_workloads_config_maps_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/list_user_workloads_secrets_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/list_workloads_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/load_snapshot_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/recovery_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/save_snapshot_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/scheduled_snapshots_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/storage_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/task_logs_retention_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/triggerer_resource.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/user_workloads_config_map.ex create mode 100644 clients/composer/lib/google_api/composer/v1/model/user_workloads_secret.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/airflow_metadata_retention_policy_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/composer_workload.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/composer_workload_status.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/dag_processor_resource.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/data_retention_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/database_failover_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/database_failover_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/execute_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/fetch_database_properties_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_config_maps_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_secrets_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/list_workloads_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/poll_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_request.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_response.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/storage_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/task_logs_retention_config.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_config_map.ex create mode 100644 clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_secret.ex diff --git a/clients/composer/lib/google_api/composer/v1/api/projects.ex b/clients/composer/lib/google_api/composer/v1/api/projects.ex index 87ad03d315..f1fa5ed88e 100644 --- a/clients/composer/lib/google_api/composer/v1/api/projects.ex +++ b/clients/composer/lib/google_api/composer/v1/api/projects.ex @@ -101,6 +101,89 @@ defmodule GoogleApi.Composer.V1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) end + @doc """ + Triggers database failover (only for highly resilient environments). + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. Target environment: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.DatabaseFailoverRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_database_failover( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_database_failover( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:databaseFailover", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) + end + @doc """ Delete an environment. @@ -182,6 +265,174 @@ defmodule GoogleApi.Composer.V1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) end + @doc """ + Executes Airflow CLI command. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.ExecuteAirflowCommandRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_execute_airflow_command( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_execute_airflow_command( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse{}] + ) + end + + @doc """ + Fetches database properties. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. Required. The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_fetch_database_properties( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_fetch_database_properties( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:fetchDatabaseProperties", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse{}] + ) + end + @doc """ Get an existing environment. @@ -342,14 +593,14 @@ defmodule GoogleApi.Composer.V1.Api.Projects do end @doc """ - Update an environment. + Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment. ## Parameters * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the target environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -362,8 +613,7 @@ defmodule GoogleApi.Composer.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:updateMask` (*type:* `String.t`) - Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the scikit-learn version as follows: { "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows: { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following: { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. - * `:body` (*type:* `GoogleApi.Composer.V1.Model.Environment.t`) - + * `:body` (*type:* `GoogleApi.Composer.V1.Model.LoadSnapshotRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -371,7 +621,7 @@ defmodule GoogleApi.Composer.V1.Api.Projects do * `{:ok, %GoogleApi.Composer.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec composer_projects_locations_environments_patch( + @spec composer_projects_locations_environments_load_snapshot( Tesla.Env.client(), String.t(), String.t(), @@ -383,7 +633,7 @@ defmodule GoogleApi.Composer.V1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def composer_projects_locations_environments_patch( + def composer_projects_locations_environments_load_snapshot( connection, projects_id, locations_id, @@ -403,19 +653,18 @@ defmodule GoogleApi.Composer.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, - :updateMask => :query, :body => :body } request = Request.new() - |> Request.method(:patch) + |> Request.method(:post) |> Request.url( - "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}", + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:loadSnapshot", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), - "environmentsId" => URI.encode(environments_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -426,6 +675,1291 @@ defmodule GoogleApi.Composer.V1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) end + @doc """ + Update an environment. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The relative resource name of the environment to update, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:updateMask` (*type:* `String.t`) - Required. A comma-separated list of paths, relative to `Environment`, of fields to update. For example, to set the version of scikit-learn to install in the environment to 0.19.0 and to remove an existing installation of numpy, the `updateMask` parameter would include the following two `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and "config.softwareConfig.pypiPackages.numpy". The included patch environment would specify the scikit-learn version as follows: { "config":{ "softwareConfig":{ "pypiPackages":{ "scikit-learn":"==0.19.0" } } } } Note that in the above example, any existing PyPI packages other than scikit-learn and numpy will be unaffected. Only one update type may be included in a single request's `updateMask`. For example, one cannot update both the PyPI packages and labels in the same request. However, it is possible to update multiple members of a map field simultaneously in the same request. For example, to set the labels "label1" and "label2" while clearing "label3" (assuming it already exists), one can provide the paths "labels.label1", "labels.label2", and "labels.label3" and populate the patch environment as follows: { "labels":{ "label1":"new-label1-value" "label2":"new-label2-value" } } Note that in the above example, any existing labels that are not included in the `updateMask` will be unaffected. It is also possible to replace an entire map field by providing the map field's path in the `updateMask`. The new value of the field will be that which is provided in the patch environment. For example, to delete all pre-existing user-specified PyPI packages and install botocore at version 1.7.14, the `updateMask` would contain the path "config.softwareConfig.pypiPackages", and the patch environment would be the following: { "config":{ "softwareConfig":{ "pypiPackages":{ "botocore":"==1.7.14" } } } } **Note:** Only the following fields can be updated: * `config.softwareConfig.pypiPackages` * Replace all custom custom PyPI packages. If a replacement package map is not included in `environment`, all custom PyPI packages are cleared. It is an error to provide both this mask and a mask specifying an individual package. * `config.softwareConfig.pypiPackages.`packagename * Update the custom PyPI package *packagename*, preserving other packages. To delete the package, include it in `updateMask`, and omit the mapping for it in `environment.config.softwareConfig.pypiPackages`. It is an error to provide both a mask of this form and the `config.softwareConfig.pypiPackages` mask. * `labels` * Replace all environment labels. If a replacement labels map is not included in `environment`, all labels are cleared. It is an error to provide both this mask and a mask specifying one or more individual labels. * `labels.`labelName * Set the label named *labelName*, while preserving other labels. To delete the label, include it in `updateMask` and omit its mapping in `environment.labels`. It is an error to provide both a mask of this form and the `labels` mask. * `config.nodeCount` * Horizontally scale the number of nodes in the environment. An integer greater than or equal to 3 must be provided in the `config.nodeCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerNetworkAccessControl` * Replace the environment's current `WebServerNetworkAccessControl`. * `config.softwareConfig.airflowConfigOverrides` * Replace all Apache Airflow config overrides. If a replacement config overrides map is not included in `environment`, all config overrides are cleared. It is an error to provide both this mask and a mask specifying one or more individual config overrides. * `config.softwareConfig.airflowConfigOverrides.`section-name * Override the Apache Airflow config property *name* in the section named *section*, preserving other properties. To delete the property override, include it in `updateMask` and omit its mapping in `environment.config.softwareConfig.airflowConfigOverrides`. It is an error to provide both a mask of this form and the `config.softwareConfig.airflowConfigOverrides` mask. * `config.softwareConfig.envVariables` * Replace all environment variables. If a replacement environment variable map is not included in `environment`, all custom environment variables are cleared. * `config.softwareConfig.schedulerCount` * Horizontally scale the number of schedulers in Airflow. A positive integer not greater than the number of nodes must be provided in the `config.softwareConfig.schedulerCount` field. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. * `config.databaseConfig.machineType` * Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `config.webServerConfig.machineType` * Machine type on which Airflow web server is running. It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or composer-n1-webserver-8. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + * `:body` (*type:* `GoogleApi.Composer.V1.Model.Environment.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_patch( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :updateMask => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:patch) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) + end + + @doc """ + Polls Airflow CLI command execution and fetches logs. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.PollAirflowCommandRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.PollAirflowCommandResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_poll_airflow_command( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.PollAirflowCommandResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_poll_airflow_command( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:pollAirflowCommand", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.PollAirflowCommandResponse{}] + ) + end + + @doc """ + Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the source environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.SaveSnapshotRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_save_snapshot( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_save_snapshot( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:saveSnapshot", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Operation{}]) + end + + @doc """ + Stops Airflow CLI command execution. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.StopAirflowCommandRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.StopAirflowCommandResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_stop_airflow_command( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.StopAirflowCommandResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_stop_airflow_command( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:stopAirflowCommand", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.StopAirflowCommandResponse{}] + ) + end + + @doc """ + Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to create a ConfigMap for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_create( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}]) + end + + @doc """ + Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The ConfigMap to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_delete( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Empty{}]) + end + + @doc """ + Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the ConfigMap to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_get( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}]) + end + + @doc """ + Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. List ConfigMaps in the given environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of ConfigMaps to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse{}] + ) + end + + @doc """ + Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. Identifier. The resource name of the ConfigMap, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_update( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_update( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:put) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap{}]) + end + + @doc """ + Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to create a Secret for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_create( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The Secret to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_delete( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.Empty{}]) + end + + @doc """ + Gets an existing user workloads Secret. Values of the "data" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_get( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. List Secrets in the given environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of Secrets to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse{}] + ) + end + + @doc """ + Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_update( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_update( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:put) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to get workloads for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - Optional. The list filter. Currently only supports equality on the type field. The value of a field specified in the filter expression must be one ComposerWorkloadType enum option. It's possible to get multiple types using "OR" operator, e.g.: "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are returned. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of environments to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1.Model.ListWorkloadsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_workloads_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1.Model.ListWorkloadsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_workloads_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/workloads", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1.Model.ListWorkloadsResponse{}]) + end + @doc """ List ImageVersions for provided location. @@ -669,7 +2203,7 @@ defmodule GoogleApi.Composer.V1.Api.Projects do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters diff --git a/clients/composer/lib/google_api/composer/v1/metadata.ex b/clients/composer/lib/google_api/composer/v1/metadata.ex index bf6ea984eb..8a64005210 100644 --- a/clients/composer/lib/google_api/composer/v1/metadata.ex +++ b/clients/composer/lib/google_api/composer/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Composer.V1 do API client metadata for GoogleApi.Composer.V1. """ - @discovery_revision "20221114" + @discovery_revision "20240227" def discovery_revision(), do: @discovery_revision end diff --git a/clients/composer/lib/google_api/composer/v1/model/airflow_metadata_retention_policy_config.ex b/clients/composer/lib/google_api/composer/v1/model/airflow_metadata_retention_policy_config.ex new file mode 100644 index 0000000000..2c66c23b0a --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/airflow_metadata_retention_policy_config.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig do + @moduledoc """ + The policy for airflow metadata database retention. + + ## Attributes + + * `retentionDays` (*type:* `integer()`, *default:* `nil`) - Optional. How many days data should be retained for. + * `retentionMode` (*type:* `String.t`, *default:* `nil`) - Optional. Retention can be either enabled or disabled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :retentionDays => integer() | nil, + :retentionMode => String.t() | nil + } + + field(:retentionDays) + field(:retentionMode) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/cloud_data_lineage_integration.ex b/clients/composer/lib/google_api/composer/v1/model/cloud_data_lineage_integration.ex new file mode 100644 index 0000000000..536a8928e6 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/cloud_data_lineage_integration.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.CloudDataLineageIntegration do + @moduledoc """ + Configuration for Cloud Data Lineage integration. + + ## Attributes + + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether or not Cloud Data Lineage integration is enabled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enabled => boolean() | nil + } + + field(:enabled) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.CloudDataLineageIntegration do + def decode(value, options) do + GoogleApi.Composer.V1.Model.CloudDataLineageIntegration.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.CloudDataLineageIntegration do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/composer_workload.ex b/clients/composer/lib/google_api/composer/v1/model/composer_workload.ex new file mode 100644 index 0000000000..2995dcd980 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/composer_workload.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ComposerWorkload do + @moduledoc """ + Information about a single workload. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name of a workload. + * `status` (*type:* `GoogleApi.Composer.V1.Model.ComposerWorkloadStatus.t`, *default:* `nil`) - Output only. Status of a workload. + * `type` (*type:* `String.t`, *default:* `nil`) - Type of a workload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :status => GoogleApi.Composer.V1.Model.ComposerWorkloadStatus.t() | nil, + :type => String.t() | nil + } + + field(:name) + field(:status, as: GoogleApi.Composer.V1.Model.ComposerWorkloadStatus) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ComposerWorkload do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ComposerWorkload.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ComposerWorkload do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/composer_workload_status.ex b/clients/composer/lib/google_api/composer/v1/model/composer_workload_status.ex new file mode 100644 index 0000000000..77fa0c942a --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/composer_workload_status.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ComposerWorkloadStatus do + @moduledoc """ + Workload status. + + ## Attributes + + * `detailedStatusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Detailed message of the status. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. Workload state. + * `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Text to provide more descriptive status. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :detailedStatusMessage => String.t() | nil, + :state => String.t() | nil, + :statusMessage => String.t() | nil + } + + field(:detailedStatusMessage) + field(:state) + field(:statusMessage) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ComposerWorkloadStatus do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ComposerWorkloadStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ComposerWorkloadStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/dag_processor_resource.ex b/clients/composer/lib/google_api/composer/v1/model/dag_processor_resource.ex new file mode 100644 index 0000000000..cf44fcb350 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/dag_processor_resource.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.DagProcessorResource do + @moduledoc """ + Configuration for resources used by Airflow DAG processors. + + ## Attributes + + * `count` (*type:* `integer()`, *default:* `nil`) - Optional. The number of DAG processors. If not provided or set to 0, a single DAG processor instance will be created. + * `cpu` (*type:* `number()`, *default:* `nil`) - Optional. CPU request and limit for a single Airflow DAG processor replica. + * `memoryGb` (*type:* `number()`, *default:* `nil`) - Optional. Memory (GB) request and limit for a single Airflow DAG processor replica. + * `storageGb` (*type:* `number()`, *default:* `nil`) - Optional. Storage (GB) request and limit for a single Airflow DAG processor replica. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => integer() | nil, + :cpu => number() | nil, + :memoryGb => number() | nil, + :storageGb => number() | nil + } + + field(:count) + field(:cpu) + field(:memoryGb) + field(:storageGb) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.DagProcessorResource do + def decode(value, options) do + GoogleApi.Composer.V1.Model.DagProcessorResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.DagProcessorResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/data_retention_config.ex b/clients/composer/lib/google_api/composer/v1/model/data_retention_config.ex new file mode 100644 index 0000000000..8890350c66 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/data_retention_config.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.DataRetentionConfig do + @moduledoc """ + The configuration setting for Airflow database data retention mechanism. + + ## Attributes + + * `airflowMetadataRetentionConfig` (*type:* `GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig.t`, *default:* `nil`) - Optional. The retention policy for airflow metadata database. Details: go/composer-database-retention-2 + * `taskLogsRetentionConfig` (*type:* `GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig.t`, *default:* `nil`) - Optional. The configuration settings for task logs retention + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :airflowMetadataRetentionConfig => + GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig.t() | nil, + :taskLogsRetentionConfig => + GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig.t() | nil + } + + field(:airflowMetadataRetentionConfig, + as: GoogleApi.Composer.V1.Model.AirflowMetadataRetentionPolicyConfig + ) + + field(:taskLogsRetentionConfig, as: GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.DataRetentionConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.DataRetentionConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.DataRetentionConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/database_config.ex b/clients/composer/lib/google_api/composer/v1/model/database_config.ex index a8943547e8..d1902cd69a 100644 --- a/clients/composer/lib/google_api/composer/v1/model/database_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/database_config.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.Composer.V1.Model.DatabaseConfig do ## Attributes * `machineType` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + * `zone` (*type:* `String.t`, *default:* `nil`) - Optional. The Compute Engine zone where the Airflow database is created. If zone is provided, it must be in the region selected for the environment. If zone is not provided, a zone is automatically selected. The zone can only be set during environment creation. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.*. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :machineType => String.t() | nil + :machineType => String.t() | nil, + :zone => String.t() | nil } field(:machineType) + field(:zone) end defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.DatabaseConfig do diff --git a/clients/composer/lib/google_api/composer/v1/model/database_failover_request.ex b/clients/composer/lib/google_api/composer/v1/model/database_failover_request.ex new file mode 100644 index 0000000000..f802b36622 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/database_failover_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.DatabaseFailoverRequest do + @moduledoc """ + Request to trigger database failover (only for highly resilient environments). + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.DatabaseFailoverRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.DatabaseFailoverRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.DatabaseFailoverRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/database_failover_response.ex b/clients/composer/lib/google_api/composer/v1/model/database_failover_response.ex new file mode 100644 index 0000000000..7acb81d175 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/database_failover_response.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.DatabaseFailoverResponse do + @moduledoc """ + Response for DatabaseFailoverRequest. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.DatabaseFailoverResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.DatabaseFailoverResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.DatabaseFailoverResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/environment.ex b/clients/composer/lib/google_api/composer/v1/model/environment.ex index 70d3490213..5e7e5c02a0 100644 --- a/clients/composer/lib/google_api/composer/v1/model/environment.ex +++ b/clients/composer/lib/google_api/composer/v1/model/environment.ex @@ -25,7 +25,9 @@ defmodule GoogleApi.Composer.V1.Model.Environment do * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this environment was created. * `labels` (*type:* `map()`, *default:* `nil`) - Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62} * Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use. * `state` (*type:* `String.t`, *default:* `nil`) - The current state of the environment. + * `storageConfig` (*type:* `GoogleApi.Composer.V1.Model.StorageConfig.t`, *default:* `nil`) - Optional. Storage configuration for this environment. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this environment was last modified. * `uuid` (*type:* `String.t`, *default:* `nil`) - Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created. """ @@ -37,7 +39,9 @@ defmodule GoogleApi.Composer.V1.Model.Environment do :createTime => DateTime.t() | nil, :labels => map() | nil, :name => String.t() | nil, + :satisfiesPzs => boolean() | nil, :state => String.t() | nil, + :storageConfig => GoogleApi.Composer.V1.Model.StorageConfig.t() | nil, :updateTime => DateTime.t() | nil, :uuid => String.t() | nil } @@ -46,7 +50,9 @@ defmodule GoogleApi.Composer.V1.Model.Environment do field(:createTime, as: DateTime) field(:labels, type: :map) field(:name) + field(:satisfiesPzs) field(:state) + field(:storageConfig, as: GoogleApi.Composer.V1.Model.StorageConfig) field(:updateTime, as: DateTime) field(:uuid) end diff --git a/clients/composer/lib/google_api/composer/v1/model/environment_config.ex b/clients/composer/lib/google_api/composer/v1/model/environment_config.ex index ba9e9f6019..098fa4b828 100644 --- a/clients/composer/lib/google_api/composer/v1/model/environment_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/environment_config.ex @@ -21,8 +21,10 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do ## Attributes + * `airflowByoidUri` (*type:* `String.t`, *default:* `nil`) - Output only. The 'bring your own identity' variant of the URI of the Apache Airflow Web UI hosted within this environment, to be accessed with external identities using workforce identity federation (see [Access environments with workforce identity federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). * `airflowUri` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the Apache Airflow Web UI hosted within this environment (see [Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)). * `dagGcsPrefix` (*type:* `String.t`, *default:* `nil`) - Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud Storage objects reside in a flat namespace, a hierarchical file tree can be simulated using "/"-delimited object name prefixes. DAG objects for this environment reside in a simulated directory with the given prefix. + * `dataRetentionConfig` (*type:* `GoogleApi.Composer.V1.Model.DataRetentionConfig.t`, *default:* `nil`) - Optional. The configuration setting for Airflow database data retention mechanism. * `databaseConfig` (*type:* `GoogleApi.Composer.V1.Model.DatabaseConfig.t`, *default:* `nil`) - Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software. * `encryptionConfig` (*type:* `GoogleApi.Composer.V1.Model.EncryptionConfig.t`, *default:* `nil`) - Optional. The encryption options for the Cloud Composer environment and its dependencies. Cannot be updated. * `environmentSize` (*type:* `String.t`, *default:* `nil`) - Optional. The size of the Cloud Composer environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. @@ -32,6 +34,8 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do * `nodeConfig` (*type:* `GoogleApi.Composer.V1.Model.NodeConfig.t`, *default:* `nil`) - The configuration used for the Kubernetes Engine cluster. * `nodeCount` (*type:* `integer()`, *default:* `nil`) - The number of nodes in the Kubernetes Engine cluster that will be used to run this environment. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `privateEnvironmentConfig` (*type:* `GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig.t`, *default:* `nil`) - The configuration used for the Private IP Cloud Composer environment. + * `recoveryConfig` (*type:* `GoogleApi.Composer.V1.Model.RecoveryConfig.t`, *default:* `nil`) - Optional. The Recovery settings configuration of an environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + * `resilienceMode` (*type:* `String.t`, *default:* `nil`) - Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer. * `softwareConfig` (*type:* `GoogleApi.Composer.V1.Model.SoftwareConfig.t`, *default:* `nil`) - The configuration settings for software inside the environment. * `webServerConfig` (*type:* `GoogleApi.Composer.V1.Model.WebServerConfig.t`, *default:* `nil`) - Optional. The configuration settings for the Airflow web server App Engine instance. * `webServerNetworkAccessControl` (*type:* `GoogleApi.Composer.V1.Model.WebServerNetworkAccessControl.t`, *default:* `nil`) - Optional. The network-level access control policy for the Airflow web server. If unspecified, no network-level access restrictions will be applied. @@ -41,8 +45,10 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :airflowByoidUri => String.t() | nil, :airflowUri => String.t() | nil, :dagGcsPrefix => String.t() | nil, + :dataRetentionConfig => GoogleApi.Composer.V1.Model.DataRetentionConfig.t() | nil, :databaseConfig => GoogleApi.Composer.V1.Model.DatabaseConfig.t() | nil, :encryptionConfig => GoogleApi.Composer.V1.Model.EncryptionConfig.t() | nil, :environmentSize => String.t() | nil, @@ -54,6 +60,8 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do :nodeCount => integer() | nil, :privateEnvironmentConfig => GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig.t() | nil, + :recoveryConfig => GoogleApi.Composer.V1.Model.RecoveryConfig.t() | nil, + :resilienceMode => String.t() | nil, :softwareConfig => GoogleApi.Composer.V1.Model.SoftwareConfig.t() | nil, :webServerConfig => GoogleApi.Composer.V1.Model.WebServerConfig.t() | nil, :webServerNetworkAccessControl => @@ -61,8 +69,10 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do :workloadsConfig => GoogleApi.Composer.V1.Model.WorkloadsConfig.t() | nil } + field(:airflowByoidUri) field(:airflowUri) field(:dagGcsPrefix) + field(:dataRetentionConfig, as: GoogleApi.Composer.V1.Model.DataRetentionConfig) field(:databaseConfig, as: GoogleApi.Composer.V1.Model.DatabaseConfig) field(:encryptionConfig, as: GoogleApi.Composer.V1.Model.EncryptionConfig) field(:environmentSize) @@ -76,6 +86,8 @@ defmodule GoogleApi.Composer.V1.Model.EnvironmentConfig do field(:nodeConfig, as: GoogleApi.Composer.V1.Model.NodeConfig) field(:nodeCount) field(:privateEnvironmentConfig, as: GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig) + field(:recoveryConfig, as: GoogleApi.Composer.V1.Model.RecoveryConfig) + field(:resilienceMode) field(:softwareConfig, as: GoogleApi.Composer.V1.Model.SoftwareConfig) field(:webServerConfig, as: GoogleApi.Composer.V1.Model.WebServerConfig) diff --git a/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_request.ex new file mode 100644 index 0000000000..73c0f79042 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_request.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ExecuteAirflowCommandRequest do + @moduledoc """ + Execute Airflow Command request. + + ## Attributes + + * `command` (*type:* `String.t`, *default:* `nil`) - Airflow command. + * `parameters` (*type:* `list(String.t)`, *default:* `nil`) - Parameters for the Airflow command/subcommand as an array of arguments. It may contain positional arguments like `["my-dag-id"]`, key-value parameters like `["--foo=bar"]` or `["--foo","bar"]`, or other flags like `["-f"]`. + * `subcommand` (*type:* `String.t`, *default:* `nil`) - Airflow subcommand. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :command => String.t() | nil, + :parameters => list(String.t()) | nil, + :subcommand => String.t() | nil + } + + field(:command) + field(:parameters, type: :list) + field(:subcommand) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ExecuteAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ExecuteAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ExecuteAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_response.ex b/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_response.ex new file mode 100644 index 0000000000..1cae1bfad7 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/execute_airflow_command_response.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse do + @moduledoc """ + Response to ExecuteAirflowCommandRequest. + + ## Attributes + + * `error` (*type:* `String.t`, *default:* `nil`) - Error message. Empty if there was no error. + * `executionId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the command execution for polling. + * `pod` (*type:* `String.t`, *default:* `nil`) - The name of the pod where the command is executed. + * `podNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace of the pod where the command is executed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => String.t() | nil, + :executionId => String.t() | nil, + :pod => String.t() | nil, + :podNamespace => String.t() | nil + } + + field(:error) + field(:executionId) + field(:pod) + field(:podNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ExecuteAirflowCommandResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/exit_info.ex b/clients/composer/lib/google_api/composer/v1/model/exit_info.ex new file mode 100644 index 0000000000..321faff5b0 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/exit_info.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ExitInfo do + @moduledoc """ + Information about how a command ended. + + ## Attributes + + * `error` (*type:* `String.t`, *default:* `nil`) - Error message. Empty if there was no error. + * `exitCode` (*type:* `integer()`, *default:* `nil`) - The exit code from the command execution. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :error => String.t() | nil, + :exitCode => integer() | nil + } + + field(:error) + field(:exitCode) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ExitInfo do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ExitInfo.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ExitInfo do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/fetch_database_properties_response.ex b/clients/composer/lib/google_api/composer/v1/model/fetch_database_properties_response.ex new file mode 100644 index 0000000000..be0feb403b --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/fetch_database_properties_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse do + @moduledoc """ + Response for FetchDatabasePropertiesRequest. + + ## Attributes + + * `isFailoverReplicaAvailable` (*type:* `boolean()`, *default:* `nil`) - The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only fail over to the failover replica when the status is true. + * `primaryGceZone` (*type:* `String.t`, *default:* `nil`) - The Compute Engine zone that the instance is currently serving from. + * `secondaryGceZone` (*type:* `String.t`, *default:* `nil`) - The Compute Engine zone that the failover instance is currently serving from for a regional Cloud SQL instance. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :isFailoverReplicaAvailable => boolean() | nil, + :primaryGceZone => String.t() | nil, + :secondaryGceZone => String.t() | nil + } + + field(:isFailoverReplicaAvailable) + field(:primaryGceZone) + field(:secondaryGceZone) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.FetchDatabasePropertiesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/line.ex b/clients/composer/lib/google_api/composer/v1/model/line.ex new file mode 100644 index 0000000000..7cf54bf012 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/line.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.Line do + @moduledoc """ + Contains information about a single line from logs. + + ## Attributes + + * `content` (*type:* `String.t`, *default:* `nil`) - Text content of the log line. + * `lineNumber` (*type:* `integer()`, *default:* `nil`) - Number of the line. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :content => String.t() | nil, + :lineNumber => integer() | nil + } + + field(:content) + field(:lineNumber) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.Line do + def decode(value, options) do + GoogleApi.Composer.V1.Model.Line.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.Line do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_config_maps_response.ex b/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_config_maps_response.ex new file mode 100644 index 0000000000..58d309c2b7 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_config_maps_response.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse do + @moduledoc """ + The user workloads ConfigMaps for a given environment. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `userWorkloadsConfigMaps` (*type:* `list(GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t)`, *default:* `nil`) - The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :userWorkloadsConfigMaps => + list(GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.t()) | nil + } + + field(:nextPageToken) + + field(:userWorkloadsConfigMaps, + as: GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ListUserWorkloadsConfigMapsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_secrets_response.ex b/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_secrets_response.ex new file mode 100644 index 0000000000..eee024f1b1 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/list_user_workloads_secrets_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse do + @moduledoc """ + The user workloads Secrets for a given environment. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `userWorkloadsSecrets` (*type:* `list(GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t)`, *default:* `nil`) - The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :userWorkloadsSecrets => list(GoogleApi.Composer.V1.Model.UserWorkloadsSecret.t()) | nil + } + + field(:nextPageToken) + field(:userWorkloadsSecrets, as: GoogleApi.Composer.V1.Model.UserWorkloadsSecret, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ListUserWorkloadsSecretsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/list_workloads_response.ex b/clients/composer/lib/google_api/composer/v1/model/list_workloads_response.ex new file mode 100644 index 0000000000..495d52a06f --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/list_workloads_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ListWorkloadsResponse do + @moduledoc """ + Response to ListWorkloadsRequest. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `workloads` (*type:* `list(GoogleApi.Composer.V1.Model.ComposerWorkload.t)`, *default:* `nil`) - The list of environment workloads. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workloads => list(GoogleApi.Composer.V1.Model.ComposerWorkload.t()) | nil + } + + field(:nextPageToken) + field(:workloads, as: GoogleApi.Composer.V1.Model.ComposerWorkload, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ListWorkloadsResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ListWorkloadsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ListWorkloadsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/load_snapshot_request.ex b/clients/composer/lib/google_api/composer/v1/model/load_snapshot_request.ex new file mode 100644 index 0000000000..7e1948af1c --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/load_snapshot_request.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.LoadSnapshotRequest do + @moduledoc """ + Request to load a snapshot into a Cloud Composer environment. + + ## Attributes + + * `skipAirflowOverridesSetting` (*type:* `boolean()`, *default:* `nil`) - Whether or not to skip setting Airflow overrides when loading the environment's state. + * `skipEnvironmentVariablesSetting` (*type:* `boolean()`, *default:* `nil`) - Whether or not to skip setting environment variables when loading the environment's state. + * `skipGcsDataCopying` (*type:* `boolean()`, *default:* `nil`) - Whether or not to skip copying Cloud Storage data when loading the environment's state. + * `skipPypiPackagesInstallation` (*type:* `boolean()`, *default:* `nil`) - Whether or not to skip installing Pypi packages when loading the environment's state. + * `snapshotPath` (*type:* `String.t`, *default:* `nil`) - A Cloud Storage path to a snapshot to load, e.g.: "gs://my-bucket/snapshots/project_location_environment_timestamp". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :skipAirflowOverridesSetting => boolean() | nil, + :skipEnvironmentVariablesSetting => boolean() | nil, + :skipGcsDataCopying => boolean() | nil, + :skipPypiPackagesInstallation => boolean() | nil, + :snapshotPath => String.t() | nil + } + + field(:skipAirflowOverridesSetting) + field(:skipEnvironmentVariablesSetting) + field(:skipGcsDataCopying) + field(:skipPypiPackagesInstallation) + field(:snapshotPath) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.LoadSnapshotRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.LoadSnapshotRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.LoadSnapshotRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/node_config.ex b/clients/composer/lib/google_api/composer/v1/model/node_config.ex index 800218d0a2..de899064b0 100644 --- a/clients/composer/lib/google_api/composer/v1/model/node_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/node_config.ex @@ -21,6 +21,8 @@ defmodule GoogleApi.Composer.V1.Model.NodeConfig do ## Attributes + * `composerInternalIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The IP range in CIDR notation to use internally by Cloud Composer. IP addresses are not reserved - and the same range can be used by multiple Cloud Composer environments. In case of overlap, IPs from this range will not be accessible in the user's VPC network. Cannot be updated. If not specified, the default value of '100.64.128.0/20' is used. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + * `composerNetworkAttachment` (*type:* `String.t`, *default:* `nil`) - Optional. Network Attachment that Cloud Composer environment is connected to, which provides connectivity with a user's VPC network. Takes precedence over network and subnetwork settings. If not provided, but network and subnetwork are defined during environment, it will be provisioned. If not provided and network and subnetwork are also empty, then connectivity to user's VPC network is disabled. Network attachment must be provided in format projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `diskSizeGb` (*type:* `integer()`, *default:* `nil`) - Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `enableIpMasqAgent` (*type:* `boolean()`, *default:* `nil`) - Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for all destination addresses, except between pods traffic. See: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent * `ipAllocationPolicy` (*type:* `GoogleApi.Composer.V1.Model.IPAllocationPolicy.t`, *default:* `nil`) - Optional. The configuration for controlling how IPs are allocated in the GKE cluster. @@ -30,12 +32,14 @@ defmodule GoogleApi.Composer.V1.Model.NodeConfig do * `oauthScopes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The set of Google API scopes to be made available on all node VMs. If `oauth_scopes` is empty, defaults to ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The Google Cloud Platform Service Account to be used by the node VMs. If a service account is not specified, the "default" Compute Engine service account is used. Cannot be updated. * `subnetwork` (*type:* `String.t`, *default:* `nil`) - Optional. The Compute Engine subnetwork to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" If a subnetwork is provided, `nodeConfig.network` must also be provided, and the subnetwork must belong to the enclosing environment's project and location. - * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :composerInternalIpv4CidrBlock => String.t() | nil, + :composerNetworkAttachment => String.t() | nil, :diskSizeGb => integer() | nil, :enableIpMasqAgent => boolean() | nil, :ipAllocationPolicy => GoogleApi.Composer.V1.Model.IPAllocationPolicy.t() | nil, @@ -48,6 +52,8 @@ defmodule GoogleApi.Composer.V1.Model.NodeConfig do :tags => list(String.t()) | nil } + field(:composerInternalIpv4CidrBlock) + field(:composerNetworkAttachment) field(:diskSizeGb) field(:enableIpMasqAgent) field(:ipAllocationPolicy, as: GoogleApi.Composer.V1.Model.IPAllocationPolicy) diff --git a/clients/composer/lib/google_api/composer/v1/model/operation.ex b/clients/composer/lib/google_api/composer/v1/model/operation.ex index c1a25b7fe2..b68d9a92ed 100644 --- a/clients/composer/lib/google_api/composer/v1/model/operation.ex +++ b/clients/composer/lib/google_api/composer/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Composer.V1.Model.Operation do * `error` (*type:* `GoogleApi.Composer.V1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_request.ex new file mode 100644 index 0000000000..a3bb10a03c --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.PollAirflowCommandRequest do + @moduledoc """ + Poll Airflow Command request. + + ## Attributes + + * `executionId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the command execution. + * `nextLineNumber` (*type:* `integer()`, *default:* `nil`) - Line number from which new logs should be fetched. + * `pod` (*type:* `String.t`, *default:* `nil`) - The name of the pod where the command is executed. + * `podNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace of the pod where the command is executed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :executionId => String.t() | nil, + :nextLineNumber => integer() | nil, + :pod => String.t() | nil, + :podNamespace => String.t() | nil + } + + field(:executionId) + field(:nextLineNumber) + field(:pod) + field(:podNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.PollAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.PollAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.PollAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_response.ex b/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_response.ex new file mode 100644 index 0000000000..201a5af514 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/poll_airflow_command_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.PollAirflowCommandResponse do + @moduledoc """ + Response to PollAirflowCommandRequest. + + ## Attributes + + * `exitInfo` (*type:* `GoogleApi.Composer.V1.Model.ExitInfo.t`, *default:* `nil`) - The result exit status of the command. + * `output` (*type:* `list(GoogleApi.Composer.V1.Model.Line.t)`, *default:* `nil`) - Output from the command execution. It may not contain the full output and the caller may need to poll for more lines. + * `outputEnd` (*type:* `boolean()`, *default:* `nil`) - Whether the command execution has finished and there is no more output. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :exitInfo => GoogleApi.Composer.V1.Model.ExitInfo.t() | nil, + :output => list(GoogleApi.Composer.V1.Model.Line.t()) | nil, + :outputEnd => boolean() | nil + } + + field(:exitInfo, as: GoogleApi.Composer.V1.Model.ExitInfo) + field(:output, as: GoogleApi.Composer.V1.Model.Line, type: :list) + field(:outputEnd) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.PollAirflowCommandResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.PollAirflowCommandResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.PollAirflowCommandResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/private_environment_config.ex b/clients/composer/lib/google_api/composer/v1/model/private_environment_config.ex index 498b35bcdc..1e48f9833a 100644 --- a/clients/composer/lib/google_api/composer/v1/model/private_environment_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/private_environment_config.ex @@ -25,6 +25,7 @@ defmodule GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig do * `cloudComposerNetworkIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The CIDR block from which IP range for Cloud Composer Network in tenant project will be reserved. Needs to be disjoint from private_cluster_config.master_ipv4_cidr_block and cloud_sql_ipv4_cidr_block. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `cloudComposerNetworkIpv4ReservedRange` (*type:* `String.t`, *default:* `nil`) - Output only. The IP range reserved for the tenant project's Cloud Composer network. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `cloudSqlIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The CIDR block from which IP range in tenant project will be reserved for Cloud SQL. Needs to be disjoint from `web_server_ipv4_cidr_block`. + * `enablePrivateBuildsOnly` (*type:* `boolean()`, *default:* `nil`) - Optional. If `true`, builds performed during operations that install Python packages have only private connectivity to Google services (including Artifact Registry) and VPC network (if either `NodeConfig.network` and `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` field are specified). If `false`, the builds also have access to the internet. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `enablePrivateEnvironment` (*type:* `boolean()`, *default:* `nil`) - Optional. If `true`, a Private IP Cloud Composer environment is created. If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be set to true for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `enablePrivatelyUsedPublicIps` (*type:* `boolean()`, *default:* `nil`) - Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for `IPAllocationPolicy.cluster_ipv4_cidr_block` and `IPAllocationPolicy.service_ipv4_cidr_block`. * `networkingConfig` (*type:* `GoogleApi.Composer.V1.Model.NetworkingConfig.t`, *default:* `nil`) - Optional. Configuration for the network connections configuration in the environment. @@ -40,6 +41,7 @@ defmodule GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig do :cloudComposerNetworkIpv4CidrBlock => String.t() | nil, :cloudComposerNetworkIpv4ReservedRange => String.t() | nil, :cloudSqlIpv4CidrBlock => String.t() | nil, + :enablePrivateBuildsOnly => boolean() | nil, :enablePrivateEnvironment => boolean() | nil, :enablePrivatelyUsedPublicIps => boolean() | nil, :networkingConfig => GoogleApi.Composer.V1.Model.NetworkingConfig.t() | nil, @@ -52,6 +54,7 @@ defmodule GoogleApi.Composer.V1.Model.PrivateEnvironmentConfig do field(:cloudComposerNetworkIpv4CidrBlock) field(:cloudComposerNetworkIpv4ReservedRange) field(:cloudSqlIpv4CidrBlock) + field(:enablePrivateBuildsOnly) field(:enablePrivateEnvironment) field(:enablePrivatelyUsedPublicIps) field(:networkingConfig, as: GoogleApi.Composer.V1.Model.NetworkingConfig) diff --git a/clients/composer/lib/google_api/composer/v1/model/recovery_config.ex b/clients/composer/lib/google_api/composer/v1/model/recovery_config.ex new file mode 100644 index 0000000000..4a67682544 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/recovery_config.ex @@ -0,0 +1,47 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.RecoveryConfig do + @moduledoc """ + The Recovery settings of an environment. + + ## Attributes + + * `scheduledSnapshotsConfig` (*type:* `GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig.t`, *default:* `nil`) - Optional. The configuration for scheduled snapshot creation mechanism. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :scheduledSnapshotsConfig => + GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig.t() | nil + } + + field(:scheduledSnapshotsConfig, as: GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.RecoveryConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.RecoveryConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.RecoveryConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/save_snapshot_request.ex b/clients/composer/lib/google_api/composer/v1/model/save_snapshot_request.ex new file mode 100644 index 0000000000..b11b68062d --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/save_snapshot_request.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.SaveSnapshotRequest do + @moduledoc """ + Request to create a snapshot of a Cloud Composer environment. + + ## Attributes + + * `snapshotLocation` (*type:* `String.t`, *default:* `nil`) - Location in a Cloud Storage where the snapshot is going to be stored, e.g.: "gs://my-bucket/snapshots". + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :snapshotLocation => String.t() | nil + } + + field(:snapshotLocation) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.SaveSnapshotRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.SaveSnapshotRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.SaveSnapshotRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/scheduled_snapshots_config.ex b/clients/composer/lib/google_api/composer/v1/model/scheduled_snapshots_config.ex new file mode 100644 index 0000000000..01d0e7697a --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/scheduled_snapshots_config.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig do + @moduledoc """ + The configuration for scheduled snapshot creation mechanism. + + ## Attributes + + * `enabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether scheduled snapshots creation is enabled. + * `snapshotCreationSchedule` (*type:* `String.t`, *default:* `nil`) - Optional. The cron expression representing the time when snapshots creation mechanism runs. This field is subject to additional validation around frequency of execution. + * `snapshotLocation` (*type:* `String.t`, *default:* `nil`) - Optional. The Cloud Storage location for storing automatically created snapshots. + * `timeZone` (*type:* `String.t`, *default:* `nil`) - Optional. Time zone that sets the context to interpret snapshot_creation_schedule. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :enabled => boolean() | nil, + :snapshotCreationSchedule => String.t() | nil, + :snapshotLocation => String.t() | nil, + :timeZone => String.t() | nil + } + + field(:enabled) + field(:snapshotCreationSchedule) + field(:snapshotLocation) + field(:timeZone) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.ScheduledSnapshotsConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/software_config.ex b/clients/composer/lib/google_api/composer/v1/model/software_config.ex index d2e31042fb..a6f7cea1e3 100644 --- a/clients/composer/lib/google_api/composer/v1/model/software_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/software_config.ex @@ -22,30 +22,37 @@ defmodule GoogleApi.Composer.V1.Model.SoftwareConfig do ## Attributes * `airflowConfigOverrides` (*type:* `map()`, *default:* `nil`) - Optional. Apache Airflow configuration properties to override. Property keys contain the section and property names, separated by a hyphen, for example "core-dags_are_paused_at_creation". Section names must not contain hyphens ("-"), opening square brackets ("["), or closing square brackets ("]"). The property name must not be empty and must not contain an equals sign ("=") or semicolon (";"). Section and property names must not contain a period ("."). Apache Airflow configuration property names must be written in [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can contain any character, and can be written in any lower/upper case format. Certain Apache Airflow configuration property values are [blocked](/composer/docs/concepts/airflow-configurations), and cannot be overridden. + * `cloudDataLineageIntegration` (*type:* `GoogleApi.Composer.V1.Model.CloudDataLineageIntegration.t`, *default:* `nil`) - Optional. The configuration for Cloud Data Lineage integration. * `envVariables` (*type:* `map()`, *default:* `nil`) - Optional. Additional environment variables to provide to the Apache Airflow scheduler, worker, and webserver processes. Environment variable names must match the regular expression `a-zA-Z_*`. They cannot specify Apache Airflow software configuration overrides (they cannot match the regular expression `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the following reserved names: * `AIRFLOW_HOME` * `C_FORCE_ROOT` * `CONTAINER_NAME` * `DAGS_FOLDER` * `GCP_PROJECT` * `GCS_BUCKET` * `GKE_CLUSTER_NAME` * `SQL_DATABASE` * `SQL_INSTANCE` * `SQL_PASSWORD` * `SQL_PROJECT` * `SQL_REGION` * `SQL_USER` * `imageVersion` (*type:* `String.t`, *default:* `nil`) - The version of the software running in the environment. This encapsulates both the version of Cloud Composer functionality and the version of Apache Airflow. It must match the regular expression `composer-([0-9]+(\\.[0-9]+\\.[0-9]+(-preview\\.[0-9]+)?)?|latest)-airflow-([0-9]+(\\.[0-9]+(\\.[0-9]+)?)?)`. When used as input, the server also checks if the provided version is supported and denies the request for an unsupported version. The Cloud Composer portion of the image version is a full [semantic version](https://semver.org), or an alias in the form of major version number or `latest`. When an alias is provided, the server replaces it with the current Cloud Composer version that satisfies the alias. The Apache Airflow portion of the image version is a full semantic version that points to one of the supported Apache Airflow versions, or an alias in the form of only major or major.minor versions specified. When an alias is provided, the server replaces it with the latest Apache Airflow version that satisfies the alias and is supported in the given Cloud Composer version. In all cases, the resolved image version is stored in the same field. See also [version list](/composer/docs/concepts/versioning/composer-versions) and [versioning overview](/composer/docs/concepts/versioning/composer-versioning-overview). * `pypiPackages` (*type:* `map()`, *default:* `nil`) - Optional. Custom Python Package Index (PyPI) packages to be installed in the environment. Keys refer to the lowercase package name such as "numpy" and values are the lowercase extras and version specifier such as "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a package without pinning it to a version specifier, use the empty string as the value. * `pythonVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes. Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be updated. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use Python major version 3. * `schedulerCount` (*type:* `integer()`, *default:* `nil`) - Optional. The number of schedulers for Airflow. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. + * `webServerPluginsMode` (*type:* `String.t`, *default:* `nil`) - Optional. Whether or not the web server uses custom plugins. If unspecified, the field defaults to `PLUGINS_ENABLED`. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :airflowConfigOverrides => map() | nil, + :cloudDataLineageIntegration => + GoogleApi.Composer.V1.Model.CloudDataLineageIntegration.t() | nil, :envVariables => map() | nil, :imageVersion => String.t() | nil, :pypiPackages => map() | nil, :pythonVersion => String.t() | nil, - :schedulerCount => integer() | nil + :schedulerCount => integer() | nil, + :webServerPluginsMode => String.t() | nil } field(:airflowConfigOverrides, type: :map) + field(:cloudDataLineageIntegration, as: GoogleApi.Composer.V1.Model.CloudDataLineageIntegration) field(:envVariables, type: :map) field(:imageVersion) field(:pypiPackages, type: :map) field(:pythonVersion) field(:schedulerCount) + field(:webServerPluginsMode) end defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.SoftwareConfig do diff --git a/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_request.ex new file mode 100644 index 0000000000..cc5adb09fb --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.StopAirflowCommandRequest do + @moduledoc """ + Stop Airflow Command request. + + ## Attributes + + * `executionId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the command execution. + * `force` (*type:* `boolean()`, *default:* `nil`) - If true, the execution is terminated forcefully (SIGKILL). If false, the execution is stopped gracefully, giving it time for cleanup. + * `pod` (*type:* `String.t`, *default:* `nil`) - The name of the pod where the command is executed. + * `podNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace of the pod where the command is executed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :executionId => String.t() | nil, + :force => boolean() | nil, + :pod => String.t() | nil, + :podNamespace => String.t() | nil + } + + field(:executionId) + field(:force) + field(:pod) + field(:podNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.StopAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1.Model.StopAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.StopAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_response.ex b/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_response.ex new file mode 100644 index 0000000000..d08dd05353 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/stop_airflow_command_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.StopAirflowCommandResponse do + @moduledoc """ + Response to StopAirflowCommandRequest. + + ## Attributes + + * `isDone` (*type:* `boolean()`, *default:* `nil`) - Whether the execution is still running. + * `output` (*type:* `list(String.t)`, *default:* `nil`) - Output message from stopping execution request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :isDone => boolean() | nil, + :output => list(String.t()) | nil + } + + field(:isDone) + field(:output, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.StopAirflowCommandResponse do + def decode(value, options) do + GoogleApi.Composer.V1.Model.StopAirflowCommandResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.StopAirflowCommandResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/storage_config.ex b/clients/composer/lib/google_api/composer/v1/model/storage_config.ex new file mode 100644 index 0000000000..1b883341d6 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/storage_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.StorageConfig do + @moduledoc """ + The configuration for data storage in the environment. + + ## Attributes + + * `bucket` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the Cloud Storage bucket used by the environment. No `gs://` prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bucket => String.t() | nil + } + + field(:bucket) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.StorageConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.StorageConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.StorageConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/task_logs_retention_config.ex b/clients/composer/lib/google_api/composer/v1/model/task_logs_retention_config.ex new file mode 100644 index 0000000000..d4823cc969 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/task_logs_retention_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig do + @moduledoc """ + The configuration setting for Task Logs. + + ## Attributes + + * `storageMode` (*type:* `String.t`, *default:* `nil`) - Optional. The mode of storage for Airflow workers task logs. For details, see go/composer-store-task-logs-in-cloud-logging-only-design-doc + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :storageMode => String.t() | nil + } + + field(:storageMode) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig do + def decode(value, options) do + GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.TaskLogsRetentionConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/triggerer_resource.ex b/clients/composer/lib/google_api/composer/v1/model/triggerer_resource.ex new file mode 100644 index 0000000000..538bfac039 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/triggerer_resource.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.TriggererResource do + @moduledoc """ + Configuration for resources used by Airflow triggerers. + + ## Attributes + + * `count` (*type:* `integer()`, *default:* `nil`) - Optional. The number of triggerers. + * `cpu` (*type:* `number()`, *default:* `nil`) - Optional. CPU request and limit for a single Airflow triggerer replica. + * `memoryGb` (*type:* `number()`, *default:* `nil`) - Optional. Memory (GB) request and limit for a single Airflow triggerer replica. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => integer() | nil, + :cpu => number() | nil, + :memoryGb => number() | nil + } + + field(:count) + field(:cpu) + field(:memoryGb) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.TriggererResource do + def decode(value, options) do + GoogleApi.Composer.V1.Model.TriggererResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.TriggererResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/user_workloads_config_map.ex b/clients/composer/lib/google_api/composer/v1/model/user_workloads_config_map.ex new file mode 100644 index 0000000000..31105d4f00 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/user_workloads_config_map.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap do + @moduledoc """ + User workloads ConfigMap used by Airflow tasks that run with Kubernetes executor or KubernetesPodOperator. + + ## Attributes + + * `data` (*type:* `map()`, *default:* `nil`) - Optional. The "data" field of Kubernetes ConfigMap, organized in key-value pairs. For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the ConfigMap, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :data => map() | nil, + :name => String.t() | nil + } + + field(:data, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap do + def decode(value, options) do + GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.UserWorkloadsConfigMap do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/user_workloads_secret.ex b/clients/composer/lib/google_api/composer/v1/model/user_workloads_secret.ex new file mode 100644 index 0000000000..c19288e0be --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1/model/user_workloads_secret.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1.Model.UserWorkloadsSecret do + @moduledoc """ + User workloads Secret used by Airflow tasks that run with Kubernetes executor or KubernetesPodOperator. + + ## Attributes + + * `data` (*type:* `map()`, *default:* `nil`) - Optional. The "data" field of Kubernetes Secret, organized in key-value pairs, which can contain sensitive values such as a password, a token, or a key. The values for all keys have to be base64-encoded strings. For details see: https://kubernetes.io/docs/concepts/configuration/secret/ + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :data => map() | nil, + :name => String.t() | nil + } + + field(:data, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1.Model.UserWorkloadsSecret do + def decode(value, options) do + GoogleApi.Composer.V1.Model.UserWorkloadsSecret.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1.Model.UserWorkloadsSecret do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1/model/workloads_config.ex b/clients/composer/lib/google_api/composer/v1/model/workloads_config.ex index bb7f4cd6e2..d64c99df1b 100644 --- a/clients/composer/lib/google_api/composer/v1/model/workloads_config.ex +++ b/clients/composer/lib/google_api/composer/v1/model/workloads_config.ex @@ -21,7 +21,9 @@ defmodule GoogleApi.Composer.V1.Model.WorkloadsConfig do ## Attributes + * `dagProcessor` (*type:* `GoogleApi.Composer.V1.Model.DagProcessorResource.t`, *default:* `nil`) - Optional. Resources used by Airflow DAG processors. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `scheduler` (*type:* `GoogleApi.Composer.V1.Model.SchedulerResource.t`, *default:* `nil`) - Optional. Resources used by Airflow schedulers. + * `triggerer` (*type:* `GoogleApi.Composer.V1.Model.TriggererResource.t`, *default:* `nil`) - Optional. Resources used by Airflow triggerers. * `webServer` (*type:* `GoogleApi.Composer.V1.Model.WebServerResource.t`, *default:* `nil`) - Optional. Resources used by Airflow web server. * `worker` (*type:* `GoogleApi.Composer.V1.Model.WorkerResource.t`, *default:* `nil`) - Optional. Resources used by Airflow workers. """ @@ -29,12 +31,16 @@ defmodule GoogleApi.Composer.V1.Model.WorkloadsConfig do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :dagProcessor => GoogleApi.Composer.V1.Model.DagProcessorResource.t() | nil, :scheduler => GoogleApi.Composer.V1.Model.SchedulerResource.t() | nil, + :triggerer => GoogleApi.Composer.V1.Model.TriggererResource.t() | nil, :webServer => GoogleApi.Composer.V1.Model.WebServerResource.t() | nil, :worker => GoogleApi.Composer.V1.Model.WorkerResource.t() | nil } + field(:dagProcessor, as: GoogleApi.Composer.V1.Model.DagProcessorResource) field(:scheduler, as: GoogleApi.Composer.V1.Model.SchedulerResource) + field(:triggerer, as: GoogleApi.Composer.V1.Model.TriggererResource) field(:webServer, as: GoogleApi.Composer.V1.Model.WebServerResource) field(:worker, as: GoogleApi.Composer.V1.Model.WorkerResource) end diff --git a/clients/composer/lib/google_api/composer/v1beta1/api/projects.ex b/clients/composer/lib/google_api/composer/v1beta1/api/projects.ex index 318323ceac..95347921f8 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/api/projects.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/api/projects.ex @@ -184,6 +184,89 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) end + @doc """ + Triggers database failover (only for highly resilient environments). + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. Target environment: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.DatabaseFailoverRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_database_failover( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_database_failover( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:databaseFailover", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) + end + @doc """ Delete an environment. @@ -265,6 +348,174 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) end + @doc """ + Executes Airflow CLI command. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_execute_airflow_command( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_execute_airflow_command( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:executeAirflowCommand", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandResponse{}] + ) + end + + @doc """ + Fetches database properties. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. Required. The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_fetch_database_properties( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_fetch_database_properties( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:fetchDatabaseProperties", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse{}] + ) + end + @doc """ Get an existing environment. @@ -595,14 +846,14 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do end @doc """ - Restart Airflow web server. + Polls Airflow CLI command execution and fetches logs. ## Parameters * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the environment to restart the web server for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. - * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -615,15 +866,15 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.RestartWebServerRequest.t`) - + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.PollAirflowCommandRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns - * `{:ok, %GoogleApi.Composer.V1beta1.Model.Operation{}}` on success + * `{:ok, %GoogleApi.Composer.V1beta1.Model.PollAirflowCommandResponse{}}` on success * `{:error, info}` on failure """ - @spec composer_projects_locations_environments_restart_web_server( + @spec composer_projects_locations_environments_poll_airflow_command( Tesla.Env.client(), String.t(), String.t(), @@ -631,11 +882,11 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do keyword(), keyword() ) :: - {:ok, GoogleApi.Composer.V1beta1.Model.Operation.t()} + {:ok, GoogleApi.Composer.V1beta1.Model.PollAirflowCommandResponse.t()} | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def composer_projects_locations_environments_restart_web_server( + def composer_projects_locations_environments_poll_airflow_command( connection, projects_id, locations_id, @@ -662,7 +913,7 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do Request.new() |> Request.method(:post) |> Request.url( - "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:restartWebServer", + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:pollAirflowCommand", %{ "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), @@ -674,18 +925,20 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do connection |> Connection.execute(request) - |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.PollAirflowCommandResponse{}] + ) end @doc """ - Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest. + Restart Airflow web server. ## Parameters * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the source environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. - * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the environment to restart the web server for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -698,7 +951,7 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). - * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.SaveSnapshotRequest.t`) - + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.RestartWebServerRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -706,7 +959,7 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do * `{:ok, %GoogleApi.Composer.V1beta1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec composer_projects_locations_environments_save_snapshot( + @spec composer_projects_locations_environments_restart_web_server( Tesla.Env.client(), String.t(), String.t(), @@ -718,7 +971,90 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def composer_projects_locations_environments_save_snapshot( + def composer_projects_locations_environments_restart_web_server( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:restartWebServer", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) + end + + @doc """ + Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the source environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.SaveSnapshotRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_save_snapshot( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_save_snapshot( connection, projects_id, locations_id, @@ -760,6 +1096,1046 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Operation{}]) end + @doc """ + Stops Airflow CLI command execution. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `environment`. The resource name of the environment in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * `locations_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `environment`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.StopAirflowCommandRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_stop_airflow_command( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_stop_airflow_command( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}:stopAirflowCommand", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse{}] + ) + end + + @doc """ + Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to create a ConfigMap for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_create( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}] + ) + end + + @doc """ + Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The ConfigMap to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_delete( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Empty{}]) + end + + @doc """ + Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the ConfigMap to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_get( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}] + ) + end + + @doc """ + Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. List ConfigMaps in the given environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of ConfigMaps to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse{}] + ) + end + + @doc """ + Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. Identifier. The resource name of the ConfigMap, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * `locations_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `user_workloads_config_maps_id` (*type:* `String.t`) - Part of `userWorkloadsConfigMap.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_config_maps_update( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_config_maps_update( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_config_maps_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:put) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsConfigMapsId" => + URI.encode(user_workloads_config_maps_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap{}] + ) + end + + @doc """ + Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to create a Secret for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_create( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The Secret to delete, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.Empty{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.Empty.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_delete( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:delete) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.Empty{}]) + end + + @doc """ + Gets an existing user workloads Secret. Values of the "data" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the Secret to get, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_get( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. List Secrets in the given environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of Secrets to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse{}] + ) + end + + @doc """ + Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * `locations_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `user_workloads_secrets_id` (*type:* `String.t`) - Part of `userWorkloadsSecret.name`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:body` (*type:* `GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_user_workloads_secrets_update( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_user_workloads_secrets_update( + connection, + projects_id, + locations_id, + environments_id, + user_workloads_secrets_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:put) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/userWorkloadsSecrets/{userWorkloadsSecretsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1), + "userWorkloadsSecretsId" => + URI.encode(user_workloads_secrets_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode(opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret{}]) + end + + @doc """ + Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + + ## Parameters + + * `connection` (*type:* `GoogleApi.Composer.V1beta1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The environment name to get workloads for, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `environments_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `optional_params` (*type:* `keyword()`) - Optional parameters + * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. + * `:access_token` (*type:* `String.t`) - OAuth access token. + * `:alt` (*type:* `String.t`) - Data format for response. + * `:callback` (*type:* `String.t`) - JSONP + * `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response. + * `:key` (*type:* `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. + * `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user. + * `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks. + * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. + * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). + * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - Optional. The list filter. Currently only supports equality on the type field. The value of a field specified in the filter expression must be one ComposerWorkloadType enum option. It's possible to get multiple types using "OR" operator, e.g.: "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are returned. + * `:pageSize` (*type:* `integer()`) - Optional. The maximum number of environments to return. + * `:pageToken` (*type:* `String.t`) - Optional. The next_page_token value returned from a previous List request, if any. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec composer_projects_locations_environments_workloads_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def composer_projects_locations_environments_workloads_list( + connection, + projects_id, + locations_id, + environments_id, + optional_params \\ [], + opts \\ [] + ) do + optional_params_config = %{ + :"$.xgafv" => :query, + :access_token => :query, + :alt => :query, + :callback => :query, + :fields => :query, + :key => :query, + :oauth_token => :query, + :prettyPrint => :query, + :quotaUser => :query, + :uploadType => :query, + :upload_protocol => :query, + :filter => :query, + :pageSize => :query, + :pageToken => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1beta1/projects/{projectsId}/locations/{locationsId}/environments/{environmentsId}/workloads", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "environmentsId" => URI.encode(environments_id, &URI.char_unreserved?/1) + } + ) + |> Request.add_optional_params(optional_params_config, optional_params) + |> Request.library_version(@library_version) + + connection + |> Connection.execute(request) + |> Response.decode( + opts ++ [struct: %GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse{}] + ) + end + @doc """ List ImageVersions for provided location. @@ -1005,7 +2381,7 @@ defmodule GoogleApi.Composer.V1beta1.Api.Projects do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters diff --git a/clients/composer/lib/google_api/composer/v1beta1/metadata.ex b/clients/composer/lib/google_api/composer/v1beta1/metadata.ex index cc57cb5952..81618a2e8d 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/metadata.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.Composer.V1beta1 do API client metadata for GoogleApi.Composer.V1beta1. """ - @discovery_revision "20221114" + @discovery_revision "20240227" def discovery_revision(), do: @discovery_revision end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/airflow_metadata_retention_policy_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/airflow_metadata_retention_policy_config.ex new file mode 100644 index 0000000000..46c464999f --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/airflow_metadata_retention_policy_config.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig do + @moduledoc """ + The policy for airflow metadata database retention. + + ## Attributes + + * `retentionDays` (*type:* `integer()`, *default:* `nil`) - Optional. How many days data should be retained for. + * `retentionMode` (*type:* `String.t`, *default:* `nil`) - Optional. Retention can be either enabled or disabled. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :retentionDays => integer() | nil, + :retentionMode => String.t() | nil + } + + field(:retentionDays) + field(:retentionMode) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload.ex b/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload.ex new file mode 100644 index 0000000000..42857d5f72 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ComposerWorkload do + @moduledoc """ + Information about a single workload. + + ## Attributes + + * `name` (*type:* `String.t`, *default:* `nil`) - Name of a workload. + * `status` (*type:* `GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus.t`, *default:* `nil`) - Output only. Status of a workload. + * `type` (*type:* `String.t`, *default:* `nil`) - Type of a workload. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :name => String.t() | nil, + :status => GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus.t() | nil, + :type => String.t() | nil + } + + field(:name) + field(:status, as: GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus) + field(:type) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ComposerWorkload do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ComposerWorkload.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ComposerWorkload do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload_status.ex b/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload_status.ex new file mode 100644 index 0000000000..8535775b53 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/composer_workload_status.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus do + @moduledoc """ + Workload status. + + ## Attributes + + * `detailedStatusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Detailed message of the status. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. Workload state. + * `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Text to provide more descriptive status. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :detailedStatusMessage => String.t() | nil, + :state => String.t() | nil, + :statusMessage => String.t() | nil + } + + field(:detailedStatusMessage) + field(:state) + field(:statusMessage) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ComposerWorkloadStatus do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/dag_processor_resource.ex b/clients/composer/lib/google_api/composer/v1beta1/model/dag_processor_resource.ex new file mode 100644 index 0000000000..20d7dd5fea --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/dag_processor_resource.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.DagProcessorResource do + @moduledoc """ + Configuration for resources used by Airflow DAG processors. + + ## Attributes + + * `count` (*type:* `integer()`, *default:* `nil`) - Optional. The number of DAG processors. If not provided or set to 0, a single DAG processor instance will be created. + * `cpu` (*type:* `number()`, *default:* `nil`) - Optional. CPU request and limit for a single Airflow DAG processor replica. + * `memoryGb` (*type:* `number()`, *default:* `nil`) - Optional. Memory (GB) request and limit for a single Airflow DAG processor replica. + * `storageGb` (*type:* `number()`, *default:* `nil`) - Optional. Storage (GB) request and limit for a single Airflow DAG processor replica. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :count => integer() | nil, + :cpu => number() | nil, + :memoryGb => number() | nil, + :storageGb => number() | nil + } + + field(:count) + field(:cpu) + field(:memoryGb) + field(:storageGb) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.DagProcessorResource do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.DagProcessorResource.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.DagProcessorResource do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/data_retention_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/data_retention_config.ex new file mode 100644 index 0000000000..8dae255e4c --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/data_retention_config.ex @@ -0,0 +1,58 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.DataRetentionConfig do + @moduledoc """ + The configuration setting for Airflow database data retention mechanism. + + ## Attributes + + * `airflowDatabaseRetentionDays` (*type:* `integer()`, *default:* `nil`) - Optional. The number of days describing for how long to store event-based records in airflow database. If the retention mechanism is enabled this value must be a positive integer otherwise, value should be set to 0. + * `airflowMetadataRetentionConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig.t`, *default:* `nil`) - Optional. The retention policy for airflow metadata database. + * `taskLogsRetentionConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig.t`, *default:* `nil`) - Optional. The configuration settings for task logs retention + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :airflowDatabaseRetentionDays => integer() | nil, + :airflowMetadataRetentionConfig => + GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig.t() | nil, + :taskLogsRetentionConfig => + GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig.t() | nil + } + + field(:airflowDatabaseRetentionDays) + + field(:airflowMetadataRetentionConfig, + as: GoogleApi.Composer.V1beta1.Model.AirflowMetadataRetentionPolicyConfig + ) + + field(:taskLogsRetentionConfig, as: GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.DataRetentionConfig do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.DataRetentionConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.DataRetentionConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/database_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/database_config.ex index 413b1e1647..769a4bec1d 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/database_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/database_config.ex @@ -22,15 +22,18 @@ defmodule GoogleApi.Composer.V1beta1.Model.DatabaseConfig do ## Attributes * `machineType` (*type:* `String.t`, *default:* `nil`) - Optional. Cloud SQL machine type used by Airflow database. It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. Supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + * `zone` (*type:* `String.t`, *default:* `nil`) - Optional. The Compute Engine zone where the Airflow database is created. If zone is provided, it must be in the region selected for the environment. If zone is not provided, a zone is automatically selected. The zone can only be set during environment creation. Supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.*. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ - :machineType => String.t() | nil + :machineType => String.t() | nil, + :zone => String.t() | nil } field(:machineType) + field(:zone) end defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.DatabaseConfig do diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_request.ex b/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_request.ex new file mode 100644 index 0000000000..32955c934b --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_request.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.DatabaseFailoverRequest do + @moduledoc """ + Request to trigger database failover (only for highly resilient environments). + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.DatabaseFailoverRequest do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.DatabaseFailoverRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.DatabaseFailoverRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_response.ex new file mode 100644 index 0000000000..7a3ba16c31 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/database_failover_response.ex @@ -0,0 +1,41 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.DatabaseFailoverResponse do + @moduledoc """ + Response for DatabaseFailoverRequest. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.DatabaseFailoverResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.DatabaseFailoverResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.DatabaseFailoverResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/environment.ex b/clients/composer/lib/google_api/composer/v1beta1/model/environment.ex index e6e4a9a2e6..09a28c6387 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/environment.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/environment.ex @@ -25,7 +25,9 @@ defmodule GoogleApi.Composer.V1beta1.Model.Environment do * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this environment was created. * `labels` (*type:* `map()`, *default:* `nil`) - Optional. User-defined labels for this environment. The labels map can contain no more than 64 entries. Entries of the labels map are UTF8 strings that comply with the following restrictions: * Keys must conform to regexp: \\p{Ll}\\p{Lo}{0,62} * Values must conform to regexp: [\\p{Ll}\\p{Lo}\\p{N}_-]{0,63} * Both keys and values are additionally constrained to be <= 128 bytes in size. * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the environment, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}" EnvironmentId must start with a lowercase letter followed by up to 63 lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + * `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use. * `state` (*type:* `String.t`, *default:* `nil`) - The current state of the environment. + * `storageConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.StorageConfig.t`, *default:* `nil`) - Optional. Storage configuration for this environment. * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time at which this environment was last modified. * `uuid` (*type:* `String.t`, *default:* `nil`) - Output only. The UUID (Universally Unique IDentifier) associated with this environment. This value is generated when the environment is created. """ @@ -37,7 +39,9 @@ defmodule GoogleApi.Composer.V1beta1.Model.Environment do :createTime => DateTime.t() | nil, :labels => map() | nil, :name => String.t() | nil, + :satisfiesPzs => boolean() | nil, :state => String.t() | nil, + :storageConfig => GoogleApi.Composer.V1beta1.Model.StorageConfig.t() | nil, :updateTime => DateTime.t() | nil, :uuid => String.t() | nil } @@ -46,7 +50,9 @@ defmodule GoogleApi.Composer.V1beta1.Model.Environment do field(:createTime, as: DateTime) field(:labels, type: :map) field(:name) + field(:satisfiesPzs) field(:state) + field(:storageConfig, as: GoogleApi.Composer.V1beta1.Model.StorageConfig) field(:updateTime, as: DateTime) field(:uuid) end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/environment_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/environment_config.ex index 4b6f406ce8..fcc512d03c 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/environment_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/environment_config.ex @@ -21,8 +21,10 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do ## Attributes + * `airflowByoidUri` (*type:* `String.t`, *default:* `nil`) - Output only. The 'bring your own identity' variant of the URI of the Apache Airflow Web UI hosted within this environment, to be accessed with external identities using workforce identity federation (see [Access environments with workforce identity federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). * `airflowUri` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of the Apache Airflow Web UI hosted within this environment (see [Airflow web interface](/composer/docs/how-to/accessing/airflow-web-interface)). * `dagGcsPrefix` (*type:* `String.t`, *default:* `nil`) - Output only. The Cloud Storage prefix of the DAGs for this environment. Although Cloud Storage objects reside in a flat namespace, a hierarchical file tree can be simulated using "/"-delimited object name prefixes. DAG objects for this environment reside in a simulated directory with the given prefix. + * `dataRetentionConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.DataRetentionConfig.t`, *default:* `nil`) - Optional. The configuration setting for Airflow database data retention mechanism. * `databaseConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.DatabaseConfig.t`, *default:* `nil`) - Optional. The configuration settings for Cloud SQL instance used internally by Apache Airflow software. * `encryptionConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.EncryptionConfig.t`, *default:* `nil`) - Optional. The encryption options for the Cloud Composer environment and its dependencies. Cannot be updated. * `environmentSize` (*type:* `String.t`, *default:* `nil`) - Optional. The size of the Cloud Composer environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. @@ -33,6 +35,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do * `nodeCount` (*type:* `integer()`, *default:* `nil`) - The number of nodes in the Kubernetes Engine cluster that will be used to run this environment. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `privateEnvironmentConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig.t`, *default:* `nil`) - The configuration used for the Private IP Cloud Composer environment. * `recoveryConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.RecoveryConfig.t`, *default:* `nil`) - Optional. The Recovery settings configuration of an environment. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. + * `resilienceMode` (*type:* `String.t`, *default:* `nil`) - Optional. Resilience mode of the Cloud Composer Environment. This field is supported for Cloud Composer environments in versions composer-2.2.0-airflow-*.*.* and newer. * `softwareConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.SoftwareConfig.t`, *default:* `nil`) - The configuration settings for software inside the environment. * `webServerConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.WebServerConfig.t`, *default:* `nil`) - Optional. The configuration settings for the Airflow web server App Engine instance. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `webServerNetworkAccessControl` (*type:* `GoogleApi.Composer.V1beta1.Model.WebServerNetworkAccessControl.t`, *default:* `nil`) - Optional. The network-level access control policy for the Airflow web server. If unspecified, no network-level access restrictions will be applied. @@ -42,8 +45,10 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :airflowByoidUri => String.t() | nil, :airflowUri => String.t() | nil, :dagGcsPrefix => String.t() | nil, + :dataRetentionConfig => GoogleApi.Composer.V1beta1.Model.DataRetentionConfig.t() | nil, :databaseConfig => GoogleApi.Composer.V1beta1.Model.DatabaseConfig.t() | nil, :encryptionConfig => GoogleApi.Composer.V1beta1.Model.EncryptionConfig.t() | nil, :environmentSize => String.t() | nil, @@ -56,6 +61,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do :privateEnvironmentConfig => GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig.t() | nil, :recoveryConfig => GoogleApi.Composer.V1beta1.Model.RecoveryConfig.t() | nil, + :resilienceMode => String.t() | nil, :softwareConfig => GoogleApi.Composer.V1beta1.Model.SoftwareConfig.t() | nil, :webServerConfig => GoogleApi.Composer.V1beta1.Model.WebServerConfig.t() | nil, :webServerNetworkAccessControl => @@ -63,8 +69,10 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do :workloadsConfig => GoogleApi.Composer.V1beta1.Model.WorkloadsConfig.t() | nil } + field(:airflowByoidUri) field(:airflowUri) field(:dagGcsPrefix) + field(:dataRetentionConfig, as: GoogleApi.Composer.V1beta1.Model.DataRetentionConfig) field(:databaseConfig, as: GoogleApi.Composer.V1beta1.Model.DatabaseConfig) field(:encryptionConfig, as: GoogleApi.Composer.V1beta1.Model.EncryptionConfig) field(:environmentSize) @@ -79,6 +87,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.EnvironmentConfig do field(:nodeCount) field(:privateEnvironmentConfig, as: GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig) field(:recoveryConfig, as: GoogleApi.Composer.V1beta1.Model.RecoveryConfig) + field(:resilienceMode) field(:softwareConfig, as: GoogleApi.Composer.V1beta1.Model.SoftwareConfig) field(:webServerConfig, as: GoogleApi.Composer.V1beta1.Model.WebServerConfig) diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/execute_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1beta1/model/execute_airflow_command_request.ex new file mode 100644 index 0000000000..edb4132410 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/execute_airflow_command_request.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandRequest do + @moduledoc """ + Execute Airflow Command request. + + ## Attributes + + * `command` (*type:* `String.t`, *default:* `nil`) - Airflow command. + * `parameters` (*type:* `list(String.t)`, *default:* `nil`) - Parameters for the Airflow command/subcommand as an array of arguments. It may contain positional arguments like `["my-dag-id"]`, key-value parameters like `["--foo=bar"]` or `["--foo","bar"]`, or other flags like `["-f"]`. + * `subcommand` (*type:* `String.t`, *default:* `nil`) - Airflow subcommand. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :command => String.t() | nil, + :parameters => list(String.t()) | nil, + :subcommand => String.t() | nil + } + + field(:command) + field(:parameters, type: :list) + field(:subcommand) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ExecuteAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/fetch_database_properties_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/fetch_database_properties_response.ex new file mode 100644 index 0000000000..af90ec5011 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/fetch_database_properties_response.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse do + @moduledoc """ + Response for FetchDatabasePropertiesRequest. + + ## Attributes + + * `isFailoverReplicaAvailable` (*type:* `boolean()`, *default:* `nil`) - The availability status of the failover replica. A false status indicates that the failover replica is out of sync. The primary instance can only fail over to the failover replica when the status is true. + * `primaryGceZone` (*type:* `String.t`, *default:* `nil`) - The Compute Engine zone that the instance is currently serving from. + * `secondaryGceZone` (*type:* `String.t`, *default:* `nil`) - The Compute Engine zone that the failover instance is currently serving from for a regional Cloud SQL instance. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :isFailoverReplicaAvailable => boolean() | nil, + :primaryGceZone => String.t() | nil, + :secondaryGceZone => String.t() | nil + } + + field(:isFailoverReplicaAvailable) + field(:primaryGceZone) + field(:secondaryGceZone) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.FetchDatabasePropertiesResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_config_maps_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_config_maps_response.ex new file mode 100644 index 0000000000..6f8b5793e0 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_config_maps_response.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse do + @moduledoc """ + The user workloads ConfigMaps for a given environment. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `userWorkloadsConfigMaps` (*type:* `list(GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t)`, *default:* `nil`) - The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :userWorkloadsConfigMaps => + list(GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.t()) | nil + } + + field(:nextPageToken) + + field(:userWorkloadsConfigMaps, + as: GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsConfigMapsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_secrets_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_secrets_response.ex new file mode 100644 index 0000000000..5567ff529c --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/list_user_workloads_secrets_response.ex @@ -0,0 +1,54 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse do + @moduledoc """ + The user workloads Secrets for a given environment. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `userWorkloadsSecrets` (*type:* `list(GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t)`, *default:* `nil`) - The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :userWorkloadsSecrets => + list(GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.t()) | nil + } + + field(:nextPageToken) + + field(:userWorkloadsSecrets, + as: GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ListUserWorkloadsSecretsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/list_workloads_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/list_workloads_response.ex new file mode 100644 index 0000000000..152b0604a0 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/list_workloads_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse do + @moduledoc """ + Response to ListWorkloadsRequest. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - The page token used to query for the next page if one exists. + * `workloads` (*type:* `list(GoogleApi.Composer.V1beta1.Model.ComposerWorkload.t)`, *default:* `nil`) - The list of environment workloads. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workloads => list(GoogleApi.Composer.V1beta1.Model.ComposerWorkload.t()) | nil + } + + field(:nextPageToken) + field(:workloads, as: GoogleApi.Composer.V1beta1.Model.ComposerWorkload, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.ListWorkloadsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex index 57712ec7ac..4691b034b8 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/node_config.ex @@ -21,6 +21,8 @@ defmodule GoogleApi.Composer.V1beta1.Model.NodeConfig do ## Attributes + * `composerInternalIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The IP range in CIDR notation to use internally by Cloud Composer. IP addresses are not reserved - and the same range can be used by multiple Cloud Composer environments. In case of overlap, IPs from this range will not be accessible in the user's VPC network. Cannot be updated. If not specified, the default value of '100.64.128.0/20' is used. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. + * `composerNetworkAttachment` (*type:* `String.t`, *default:* `nil`) - Optional. Network Attachment that Cloud Composer environment is connected to, which provides connectivity with a user's VPC network. Takes precedence over network and subnetwork settings. If not provided, but network and subnetwork are defined during environment, it will be provisioned. If not provided and network and subnetwork are also empty, then connectivity to user's VPC network is disabled. Network attachment must be provided in format projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `diskSizeGb` (*type:* `integer()`, *default:* `nil`) - Optional. The disk size in GB used for node VMs. Minimum size is 30GB. If unspecified, defaults to 100GB. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `enableIpMasqAgent` (*type:* `boolean()`, *default:* `nil`) - Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for all destination addresses, except between pods traffic. See: https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent * `ipAllocationPolicy` (*type:* `GoogleApi.Composer.V1beta1.Model.IPAllocationPolicy.t`, *default:* `nil`) - Optional. The IPAllocationPolicy fields for the GKE cluster. @@ -31,12 +33,14 @@ defmodule GoogleApi.Composer.V1beta1.Model.NodeConfig do * `oauthScopes` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The set of Google API scopes to be made available on all node VMs. If `oauth_scopes` is empty, defaults to ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `serviceAccount` (*type:* `String.t`, *default:* `nil`) - Optional. The Google Cloud Platform Service Account to be used by the workloads. If a service account is not specified, the "default" Compute Engine service account is used. Cannot be updated. * `subnetwork` (*type:* `String.t`, *default:* `nil`) - Optional. The Compute Engine subnetwork to be used for machine communications, specified as a [relative resource name](/apis/design/resource_names#relative_resource_name). For example: "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" If a subnetwork is provided, `nodeConfig.network` must also be provided, and the subnetwork must belong to the enclosing environment's project and location. - * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. + * `tags` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The list of instance tags applied to all node VMs. Tags are used to identify valid sources or targets for network firewalls. Each tag within the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). Cannot be updated. """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :composerInternalIpv4CidrBlock => String.t() | nil, + :composerNetworkAttachment => String.t() | nil, :diskSizeGb => integer() | nil, :enableIpMasqAgent => boolean() | nil, :ipAllocationPolicy => GoogleApi.Composer.V1beta1.Model.IPAllocationPolicy.t() | nil, @@ -50,6 +54,8 @@ defmodule GoogleApi.Composer.V1beta1.Model.NodeConfig do :tags => list(String.t()) | nil } + field(:composerInternalIpv4CidrBlock) + field(:composerNetworkAttachment) field(:diskSizeGb) field(:enableIpMasqAgent) field(:ipAllocationPolicy, as: GoogleApi.Composer.V1beta1.Model.IPAllocationPolicy) diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/operation.ex b/clients/composer/lib/google_api/composer/v1beta1/model/operation.ex index 8b992198a0..06bbfc8c6c 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/operation.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.Operation do * `error` (*type:* `GoogleApi.Composer.V1beta1.Model.Status.t`, *default:* `nil`) - The error result of the operation in case of failure or cancellation. * `metadata` (*type:* `map()`, *default:* `nil`) - Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. * `name` (*type:* `String.t`, *default:* `nil`) - The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. - * `response` (*type:* `map()`, *default:* `nil`) - The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + * `response` (*type:* `map()`, *default:* `nil`) - The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. """ use GoogleApi.Gax.ModelBase diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/poll_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1beta1/model/poll_airflow_command_request.ex new file mode 100644 index 0000000000..02363f3b57 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/poll_airflow_command_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.PollAirflowCommandRequest do + @moduledoc """ + Poll Airflow Command request. + + ## Attributes + + * `executionId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the command execution. + * `nextLineNumber` (*type:* `integer()`, *default:* `nil`) - Line number from which new logs should be fetched. + * `pod` (*type:* `String.t`, *default:* `nil`) - The name of the pod where the command is executed. + * `podNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace of the pod where the command is executed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :executionId => String.t() | nil, + :nextLineNumber => integer() | nil, + :pod => String.t() | nil, + :podNamespace => String.t() | nil + } + + field(:executionId) + field(:nextLineNumber) + field(:pod) + field(:podNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.PollAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.PollAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.PollAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/private_environment_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/private_environment_config.ex index b8598b7a92..ed37a4c03a 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/private_environment_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/private_environment_config.ex @@ -25,6 +25,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig do * `cloudComposerNetworkIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The CIDR block from which IP range for Cloud Composer Network in tenant project will be reserved. Needs to be disjoint from private_cluster_config.master_ipv4_cidr_block and cloud_sql_ipv4_cidr_block. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `cloudComposerNetworkIpv4ReservedRange` (*type:* `String.t`, *default:* `nil`) - Output only. The IP range reserved for the tenant project's Cloud Composer network. This field is supported for Cloud Composer environments in versions composer-2.*.*-airflow-*.*.* and newer. * `cloudSqlIpv4CidrBlock` (*type:* `String.t`, *default:* `nil`) - Optional. The CIDR block from which IP range in tenant project will be reserved for Cloud SQL. Needs to be disjoint from web_server_ipv4_cidr_block + * `enablePrivateBuildsOnly` (*type:* `boolean()`, *default:* `nil`) - Optional. If `true`, builds performed during operations that install Python packages have only private connectivity to Google services (including Artifact Registry) and VPC network (if either `NodeConfig.network` and `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` field are specified). If `false`, the builds also have access to the internet. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `enablePrivateEnvironment` (*type:* `boolean()`, *default:* `nil`) - Optional. If `true`, a Private IP Cloud Composer environment is created. If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be set to true for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. * `enablePrivatelyUsedPublicIps` (*type:* `boolean()`, *default:* `nil`) - Optional. When enabled, IPs from public (non-RFC1918) ranges can be used for `IPAllocationPolicy.cluster_ipv4_cidr_block` and `IPAllocationPolicy.service_ipv4_cidr_block`. * `networkingConfig` (*type:* `GoogleApi.Composer.V1beta1.Model.NetworkingConfig.t`, *default:* `nil`) - Optional. Configuration for the network connections configuration in the environment. @@ -40,6 +41,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig do :cloudComposerNetworkIpv4CidrBlock => String.t() | nil, :cloudComposerNetworkIpv4ReservedRange => String.t() | nil, :cloudSqlIpv4CidrBlock => String.t() | nil, + :enablePrivateBuildsOnly => boolean() | nil, :enablePrivateEnvironment => boolean() | nil, :enablePrivatelyUsedPublicIps => boolean() | nil, :networkingConfig => GoogleApi.Composer.V1beta1.Model.NetworkingConfig.t() | nil, @@ -53,6 +55,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.PrivateEnvironmentConfig do field(:cloudComposerNetworkIpv4CidrBlock) field(:cloudComposerNetworkIpv4ReservedRange) field(:cloudSqlIpv4CidrBlock) + field(:enablePrivateBuildsOnly) field(:enablePrivateEnvironment) field(:enablePrivatelyUsedPublicIps) field(:networkingConfig, as: GoogleApi.Composer.V1beta1.Model.NetworkingConfig) diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/software_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/software_config.ex index 87bf587a6f..41ce652519 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/software_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/software_config.ex @@ -28,6 +28,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.SoftwareConfig do * `pypiPackages` (*type:* `map()`, *default:* `nil`) - Optional. Custom Python Package Index (PyPI) packages to be installed in the environment. Keys refer to the lowercase package name such as "numpy" and values are the lowercase extras and version specifier such as "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a package without pinning it to a version specifier, use the empty string as the value. * `pythonVersion` (*type:* `String.t`, *default:* `nil`) - Optional. The major version of Python used to run the Apache Airflow scheduler, worker, and webserver processes. Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be updated. This field is only supported for Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*. Environments in newer versions always use Python major version 3. * `schedulerCount` (*type:* `integer()`, *default:* `nil`) - Optional. The number of schedulers for Airflow. This field is supported for Cloud Composer environments in versions composer-1.*.*-airflow-2.*.*. + * `webServerPluginsMode` (*type:* `String.t`, *default:* `nil`) - Optional. Whether or not the web server uses custom plugins. If unspecified, the field defaults to `PLUGINS_ENABLED`. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. """ use GoogleApi.Gax.ModelBase @@ -40,7 +41,8 @@ defmodule GoogleApi.Composer.V1beta1.Model.SoftwareConfig do :imageVersion => String.t() | nil, :pypiPackages => map() | nil, :pythonVersion => String.t() | nil, - :schedulerCount => integer() | nil + :schedulerCount => integer() | nil, + :webServerPluginsMode => String.t() | nil } field(:airflowConfigOverrides, type: :map) @@ -54,6 +56,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.SoftwareConfig do field(:pypiPackages, type: :map) field(:pythonVersion) field(:schedulerCount) + field(:webServerPluginsMode) end defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.SoftwareConfig do diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_request.ex b/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_request.ex new file mode 100644 index 0000000000..5f7eefad8c --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_request.ex @@ -0,0 +1,55 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.StopAirflowCommandRequest do + @moduledoc """ + Stop Airflow Command request. + + ## Attributes + + * `executionId` (*type:* `String.t`, *default:* `nil`) - The unique ID of the command execution. + * `force` (*type:* `boolean()`, *default:* `nil`) - If true, the execution is terminated forcefully (SIGKILL). If false, the execution is stopped gracefully, giving it time for cleanup. + * `pod` (*type:* `String.t`, *default:* `nil`) - The name of the pod where the command is executed. + * `podNamespace` (*type:* `String.t`, *default:* `nil`) - The namespace of the pod where the command is executed. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :executionId => String.t() | nil, + :force => boolean() | nil, + :pod => String.t() | nil, + :podNamespace => String.t() | nil + } + + field(:executionId) + field(:force) + field(:pod) + field(:podNamespace) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.StopAirflowCommandRequest do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.StopAirflowCommandRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.StopAirflowCommandRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_response.ex b/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_response.ex new file mode 100644 index 0000000000..224435bb80 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/stop_airflow_command_response.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse do + @moduledoc """ + Response to StopAirflowCommandRequest. + + ## Attributes + + * `isDone` (*type:* `boolean()`, *default:* `nil`) - Whether the execution is still running. + * `output` (*type:* `list(String.t)`, *default:* `nil`) - Output message from stopping execution request. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :isDone => boolean() | nil, + :output => list(String.t()) | nil + } + + field(:isDone) + field(:output, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.StopAirflowCommandResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/storage_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/storage_config.ex new file mode 100644 index 0000000000..e456bbbfaa --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/storage_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.StorageConfig do + @moduledoc """ + The configuration for data storage in the environment. + + ## Attributes + + * `bucket` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the Cloud Storage bucket used by the environment. No `gs://` prefix. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :bucket => String.t() | nil + } + + field(:bucket) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.StorageConfig do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.StorageConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.StorageConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/task_logs_retention_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/task_logs_retention_config.ex new file mode 100644 index 0000000000..45b4872c20 --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/task_logs_retention_config.ex @@ -0,0 +1,46 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig do + @moduledoc """ + The configuration setting for Task Logs. + + ## Attributes + + * `storageMode` (*type:* `String.t`, *default:* `nil`) - Optional. The mode of storage for Airflow workers task logs. For details, see go/composer-store-task-logs-in-cloud-logging-only-design-doc + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :storageMode => String.t() | nil + } + + field(:storageMode) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.TaskLogsRetentionConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_config_map.ex b/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_config_map.ex new file mode 100644 index 0000000000..d44adf6d7e --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_config_map.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap do + @moduledoc """ + User workloads ConfigMap used by Airflow tasks that run with Kubernetes executor or KubernetesPodOperator. + + ## Attributes + + * `data` (*type:* `map()`, *default:* `nil`) - Optional. The "data" field of Kubernetes ConfigMap, organized in key-value pairs. For details see: https://kubernetes.io/docs/concepts/configuration/configmap/ + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the ConfigMap, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :data => map() | nil, + :name => String.t() | nil + } + + field(:data, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.UserWorkloadsConfigMap do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_secret.ex b/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_secret.ex new file mode 100644 index 0000000000..f392a95c6d --- /dev/null +++ b/clients/composer/lib/google_api/composer/v1beta1/model/user_workloads_secret.ex @@ -0,0 +1,49 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret do + @moduledoc """ + User workloads Secret used by Airflow tasks that run with Kubernetes executor or KubernetesPodOperator. + + ## Attributes + + * `data` (*type:* `map()`, *default:* `nil`) - Optional. The "data" field of Kubernetes Secret, organized in key-value pairs, which can contain sensitive values such as a password, a token, or a key. The values for all keys have to be base64-encoded strings. For details see: https://kubernetes.io/docs/concepts/configuration/secret/ + * `name` (*type:* `String.t`, *default:* `nil`) - Identifier. The resource name of the Secret, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :data => map() | nil, + :name => String.t() | nil + } + + field(:data, type: :map) + field(:name) +end + +defimpl Poison.Decoder, for: GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret do + def decode(value, options) do + GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.Composer.V1beta1.Model.UserWorkloadsSecret do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/composer/lib/google_api/composer/v1beta1/model/workloads_config.ex b/clients/composer/lib/google_api/composer/v1beta1/model/workloads_config.ex index fd72fb3661..00c24576af 100644 --- a/clients/composer/lib/google_api/composer/v1beta1/model/workloads_config.ex +++ b/clients/composer/lib/google_api/composer/v1beta1/model/workloads_config.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.Composer.V1beta1.Model.WorkloadsConfig do ## Attributes + * `dagProcessor` (*type:* `GoogleApi.Composer.V1beta1.Model.DagProcessorResource.t`, *default:* `nil`) - Optional. Resources used by Airflow DAG processors. This field is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer. * `scheduler` (*type:* `GoogleApi.Composer.V1beta1.Model.SchedulerResource.t`, *default:* `nil`) - Optional. Resources used by Airflow schedulers. * `triggerer` (*type:* `GoogleApi.Composer.V1beta1.Model.TriggererResource.t`, *default:* `nil`) - Optional. Resources used by Airflow triggerers. * `webServer` (*type:* `GoogleApi.Composer.V1beta1.Model.WebServerResource.t`, *default:* `nil`) - Optional. Resources used by Airflow web server. @@ -30,12 +31,14 @@ defmodule GoogleApi.Composer.V1beta1.Model.WorkloadsConfig do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :dagProcessor => GoogleApi.Composer.V1beta1.Model.DagProcessorResource.t() | nil, :scheduler => GoogleApi.Composer.V1beta1.Model.SchedulerResource.t() | nil, :triggerer => GoogleApi.Composer.V1beta1.Model.TriggererResource.t() | nil, :webServer => GoogleApi.Composer.V1beta1.Model.WebServerResource.t() | nil, :worker => GoogleApi.Composer.V1beta1.Model.WorkerResource.t() | nil } + field(:dagProcessor, as: GoogleApi.Composer.V1beta1.Model.DagProcessorResource) field(:scheduler, as: GoogleApi.Composer.V1beta1.Model.SchedulerResource) field(:triggerer, as: GoogleApi.Composer.V1beta1.Model.TriggererResource) field(:webServer, as: GoogleApi.Composer.V1beta1.Model.WebServerResource)