diff --git a/clients/iam/lib/google_api/iam/v1/api/locations.ex b/clients/iam/lib/google_api/iam/v1/api/locations.ex index 5466b8f817..38eba1c768 100644 --- a/clients/iam/lib/google_api/iam/v1/api/locations.ex +++ b/clients/iam/lib/google_api/iam/v1/api/locations.ex @@ -25,15 +25,1615 @@ defmodule GoogleApi.IAM.V1.Api.Locations do @library_version Mix.Project.config() |> Keyword.get(:version, "") + @doc """ + Creates a new WorkforcePool. You cannot reuse the name of a deleted pool until 30 days after deletion. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `location`. The location of the pool to create. Format: `locations/{location}`. + * `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"). + * `:workforcePoolId` (*type:* `String.t`) - The ID to use for the pool, which becomes the final component of the resource name. The IDs must be a globally unique string of 6 to 63 lowercase letters, digits, or hyphens. It must start with a letter, and cannot have a trailing hyphen. The prefix `gcp-` is reserved for use by Google, and may not be specified. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkforcePool.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_create(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_create( + connection, + locations_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, + :workforcePoolId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/locations/{locationsId}/workforcePools", %{ + "locationsId" => URI.encode(locations_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Deletes a WorkforcePool. You cannot use a deleted WorkforcePool to exchange external credentials for Google Cloud credentials. However, deletion does not revoke credentials that have already been issued. Credentials issued for a deleted pool do not grant access to resources. If the pool is undeleted, and the credentials are not expired, they grant access again. You can undelete a pool for 30 days. After 30 days, deletion is permanent. You cannot update deleted pools. However, you can view and list them. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the pool to delete. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_delete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_delete( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => + URI.encode(workforce_pools_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets an individual WorkforcePool. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the pool to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.WorkforcePool{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_get( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.WorkforcePool.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_get( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => + URI.encode(workforce_pools_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.IAM.V1.Model.WorkforcePool{}]) + end + + @doc """ + Gets IAM policies on a WorkforcePool. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `workforce_pools_id` (*type:* `String.t`) - Part of `resource`. See documentation of `locationsId`. + * `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.IAM.V1.Model.GetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_get_iam_policy( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_get_iam_policy( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}:getIamPolicy", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.Policy{}]) + end + + @doc """ + Lists all non-deleted WorkforcePools under the specified parent. If `show_deleted` is set to `true`, then deleted pools are also listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `location`. The location of the pool. Format: `locations/{location}`. + * `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()`) - The maximum number of pools to return. If unspecified, at most 50 pools will be returned. The maximum value is 1000; values above 1000 are truncated to 1000. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListWorkforcePools` call. Provide this to retrieve the subsequent page. + * `:parent` (*type:* `String.t`) - Required. The parent resource to list pools for. Format: `organizations/{org-id}`. + * `:showDeleted` (*type:* `boolean()`) - Whether to return soft-deleted pools. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.ListWorkforcePoolsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_list(Tesla.Env.client(), String.t(), keyword(), keyword()) :: + {:ok, GoogleApi.IAM.V1.Model.ListWorkforcePoolsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_list( + connection, + locations_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, + :parent => :query, + :showDeleted => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/locations/{locationsId}/workforcePools", %{ + "locationsId" => URI.encode(locations_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.IAM.V1.Model.ListWorkforcePoolsResponse{}]) + end + + @doc """ + Updates an existing WorkforcePool. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `workforcePool.name`. Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `workforcePool.name`. See documentation of `locationsId`. + * `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. The list of fields to update. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkforcePool.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_patch( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_patch( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => + URI.encode(workforce_pools_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Sets IAM policies on a WorkforcePool. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy is being specified. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `workforce_pools_id` (*type:* `String.t`) - Part of `resource`. See documentation of `locationsId`. + * `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.IAM.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_set_iam_policy( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_set_iam_policy( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}:setIamPolicy", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.Policy{}]) + end + + @doc """ + Returns the caller's permissions on the WorkforcePool. If the pool does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `resource`. REQUIRED: The resource for which the policy detail is being requested. See [Resource names](https://cloud.google.com/apis/design/resource_names) for the appropriate value for this field. + * `workforce_pools_id` (*type:* `String.t`) - Part of `resource`. See documentation of `locationsId`. + * `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.IAM.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_test_iam_permissions( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_test_iam_permissions( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}:testIamPermissions", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.TestIamPermissionsResponse{}]) + end + + @doc """ + Undeletes a WorkforcePool, as long as it was deleted fewer than 30 days ago. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the pool to undelete. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.UndeleteWorkforcePoolRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_undelete( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_undelete( + connection, + locations_id, + workforce_pools_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/locations/{locationsId}/workforcePools/{workforcePoolsId}:undelete", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.Operation{}]) + end + @doc """ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `locations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_operations_get( + connection, + locations_id, + workforce_pools_id, + operations_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/operations/{operationsId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Creates a new WorkforcePoolProvider in a WorkforcePool. You cannot reuse the name of a deleted provider until 30 days after deletion. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `parent`. Required. The pool to create this provider in. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `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"). + * `:workforcePoolProviderId` (*type:* `String.t`) - Required. The ID for the provider, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-]. The prefix `gcp-` is reserved for use by Google, and may not be specified. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkforcePoolProvider.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_create( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_create( + connection, + locations_id, + workforce_pools_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, + :workforcePoolProviderId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url("/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Deletes a WorkforcePoolProvider. Deleting a provider does not revoke credentials that have already been\\ issued; they continue to grant access. You can undelete a provider for 30 days. After 30 days, deletion is permanent. You cannot update deleted providers. However, you can view and list them. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the provider to delete. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_delete( + connection, + locations_id, + workforce_pools_id, + providers_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets an individual WorkforcePoolProvider. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the provider to retrieve. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.WorkforcePoolProvider{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.WorkforcePoolProvider.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_get( + connection, + locations_id, + workforce_pools_id, + providers_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.WorkforcePoolProvider{}]) + end + + @doc """ + Lists all non-deleted WorkforcePoolProviders in a WorkforcePool. If `show_deleted` is set to `true`, then deleted providers are also listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `parent`. Required. The pool to list providers for. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `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()`) - The maximum number of providers to return. If unspecified, at most 50 providers are returned. The maximum value is 100; values above 100 are truncated to 100. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListWorkforcePoolProviders` call. Provide this to retrieve the subsequent page. + * `:showDeleted` (*type:* `boolean()`) - Whether to return soft-deleted providers. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.ListWorkforcePoolProvidersResponse{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_list( + Tesla.Env.client(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.ListWorkforcePoolProvidersResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_list( + connection, + locations_id, + workforce_pools_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, + :showDeleted => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers", %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_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.IAM.V1.Model.ListWorkforcePoolProvidersResponse{}] + ) + end + + @doc """ + Updates an existing WorkforcePoolProvider. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `workforcePoolProvider.name`. Output only. The resource name of the provider. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `workforcePoolProvider.name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `workforcePoolProvider.name`. See documentation of `locationsId`. + * `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. The list of fields to update. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkforcePoolProvider.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_patch( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_patch( + connection, + locations_id, + workforce_pools_id, + providers_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Undeletes a WorkforcePoolProvider, as long as it was deleted fewer than 30 days ago. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the provider to undelete. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.UndeleteWorkforcePoolProviderRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_undelete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_undelete( + connection, + locations_id, + workforce_pools_id, + providers_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}:undelete", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Creates a new WorkforcePoolProviderKey in a WorkforcePoolProvider. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `parent`. Required. The provider to create this key in. + * `workforce_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `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"). + * `:workforcePoolProviderKeyId` (*type:* `String.t`) - Required. The ID to use for the key, which becomes the final component of the resource name. This value must be 4-32 characters, and may contain the characters [a-z0-9-]. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_keys_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_keys_create( + connection, + locations_id, + workforce_pools_id, + providers_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, + :workforcePoolProviderKeyId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Deletes a WorkforcePoolProviderKey. You can undelete a key for 30 days. After 30 days, deletion is permanent. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the key to delete. + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_keys_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_keys_delete( + connection, + locations_id, + workforce_pools_id, + providers_id, + keys_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets a WorkforcePoolProviderKey. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the key to retrieve. + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.WorkforcePoolProviderKey{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_keys_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_keys_get( + connection, + locations_id, + workforce_pools_id, + providers_id, + keys_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_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.IAM.V1.Model.WorkforcePoolProviderKey{}]) + end + + @doc """ + Lists all non-deleted WorkforcePoolProviderKeys in a WorkforcePoolProvider. If `show_deleted` is set to `true`, then deleted keys are also listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `parent`. Required. The provider resource to list encryption keys for. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `parent`. See documentation of `locationsId`. + * `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()`) - The maximum number of keys to return. If unspecified, all keys are returned. The maximum value is 10; values above 10 are truncated to 10. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListWorkforcePoolProviderKeys` call. Provide this to retrieve the subsequent page. + * `:showDeleted` (*type:* `boolean()`) - Whether to return soft-deleted keys. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_providers_keys_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_providers_keys_list( + connection, + locations_id, + workforce_pools_id, + providers_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, + :showDeleted => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse{}] + ) + end + + @doc """ + Undeletes a WorkforcePoolProviderKey, as long as it was deleted fewer than 30 days ago. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The name of the key to undelete. * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. - * `operations_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -46,6 +1646,7 @@ defmodule GoogleApi.IAM.V1.Api.Locations 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.IAM.V1.Model.UndeleteWorkforcePoolProviderKeyRequest.t`) - * `opts` (*type:* `keyword()`) - Call options ## Returns @@ -53,11 +1654,12 @@ defmodule GoogleApi.IAM.V1.Api.Locations do * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success * `{:error, info}` on failure """ - @spec iam_locations_workforce_pools_operations_get( + @spec iam_locations_workforce_pools_providers_keys_undelete( Tesla.Env.client(), String.t(), String.t(), String.t(), + String.t(), keyword(), keyword() ) :: @@ -65,11 +1667,12 @@ defmodule GoogleApi.IAM.V1.Api.Locations do | {:ok, Tesla.Env.t()} | {:ok, list()} | {:error, any()} - def iam_locations_workforce_pools_operations_get( + def iam_locations_workforce_pools_providers_keys_undelete( connection, locations_id, workforce_pools_id, - operations_id, + providers_id, + keys_id, optional_params \\ [], opts \\ [] ) do @@ -84,18 +1687,20 @@ defmodule GoogleApi.IAM.V1.Api.Locations do :prettyPrint => :query, :quotaUser => :query, :uploadType => :query, - :upload_protocol => :query + :upload_protocol => :query, + :body => :body } request = Request.new() - |> Request.method(:get) + |> Request.method(:post) |> Request.url( - "/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/operations/{operationsId}", + "/v1/locations/{locationsId}/workforcePools/{workforcePoolsId}/providers/{providersId}/keys/{keysId}:undelete", %{ "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), - "operationsId" => URI.encode(operations_id, &(URI.char_unreserved?(&1) || &1 == ?/)) + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_id, &URI.char_unreserved?/1) } ) |> Request.add_optional_params(optional_params_config, optional_params) @@ -280,6 +1885,170 @@ defmodule GoogleApi.IAM.V1.Api.Locations do |> Response.decode(opts ++ [struct: %GoogleApi.IAM.V1.Model.Operation{}]) end + @doc """ + Deletes a WorkforcePoolSubject. Subject must not already be in a deleted state. A WorkforcePoolSubject is automatically created the first time an external credential is exchanged for a Google Cloud credential with a mapped `google.subject` attribute. There is no path to manually create WorkforcePoolSubjects. Once deleted, the WorkforcePoolSubject may not be used for 30 days. After 30 days, the WorkforcePoolSubject will be deleted forever and can be reused in token exchanges with Google Cloud STS. This will automatically create a new WorkforcePoolSubject that is independent of the previously deleted WorkforcePoolSubject with the same google.subject value. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the WorkforcePoolSubject. Special characters, like '/' and ':', must be escaped, because all URLs need to conform to the "When to Escape and Unescape" section of [RFC3986](https://www.ietf.org/rfc/rfc2396.txt). Format: `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `subjects_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_subjects_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_subjects_delete( + connection, + locations_id, + workforce_pools_id, + subjects_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/subjects/{subjectsId}", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "subjectsId" => URI.encode(subjects_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Undeletes a WorkforcePoolSubject, as long as it was deleted fewer than 30 days ago. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `locations_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the WorkforcePoolSubject. Special characters, like '/' and ':', must be escaped, because all URLs need to conform to the "When to Escape and Unescape" section of [RFC3986](https://www.ietf.org/rfc/rfc2396.txt). Format: `locations/{location}/workforcePools/{workforce_pool_id}/subjects/{subject_id}` + * `workforce_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `subjects_id` (*type:* `String.t`) - Part of `name`. See documentation of `locationsId`. + * `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.IAM.V1.Model.UndeleteWorkforcePoolSubjectRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_locations_workforce_pools_subjects_undelete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_locations_workforce_pools_subjects_undelete( + connection, + locations_id, + workforce_pools_id, + subjects_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/locations/{locationsId}/workforcePools/{workforcePoolsId}/subjects/{subjectsId}:undelete", + %{ + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workforcePoolsId" => URI.encode(workforce_pools_id, &URI.char_unreserved?/1), + "subjectsId" => URI.encode(subjects_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.IAM.V1.Model.Operation{}]) + end + @doc """ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. diff --git a/clients/iam/lib/google_api/iam/v1/api/projects.ex b/clients/iam/lib/google_api/iam/v1/api/projects.ex index ed7544ce9c..3abb83f88a 100644 --- a/clients/iam/lib/google_api/iam/v1/api/projects.ex +++ b/clients/iam/lib/google_api/iam/v1/api/projects.ex @@ -524,6 +524,288 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `namespaces_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `managed_identities_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `operations_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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_namespaces_managed_identities_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_namespaces_managed_identities_operations_get( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + namespaces_id, + managed_identities_id, + operations_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}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}/operations/{operationsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "namespacesId" => URI.encode(namespaces_id, &URI.char_unreserved?/1), + "managedIdentitiesId" => URI.encode(managed_identities_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `namespaces_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `managed_identities_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_sources_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `operations_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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_namespaces_managed_identities_workload_sources_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_namespaces_managed_identities_workload_sources_operations_get( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + namespaces_id, + managed_identities_id, + workload_sources_id, + operations_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}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/managedIdentities/{managedIdentitiesId}/workloadSources/{workloadSourcesId}/operations/{operationsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "namespacesId" => URI.encode(namespaces_id, &URI.char_unreserved?/1), + "managedIdentitiesId" => URI.encode(managed_identities_id, &URI.char_unreserved?/1), + "workloadSourcesId" => URI.encode(workload_sources_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `namespaces_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `operations_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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_namespaces_operations_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_namespaces_operations_get( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + namespaces_id, + operations_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}/workloadIdentityPools/{workloadIdentityPoolsId}/namespaces/{namespacesId}/operations/{operationsId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "namespacesId" => URI.encode(namespaces_id, &URI.char_unreserved?/1), + "operationsId" => URI.encode(operations_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + + ## Parameters + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server * `projects_id` (*type:* `String.t`) - Part of `name`. The name of the operation resource. * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. @@ -1131,6 +1413,464 @@ defmodule GoogleApi.IAM.V1.Api.Projects do |> Response.decode(opts ++ [struct: %GoogleApi.IAM.V1.Model.Operation{}]) end + @doc """ + Create a new WorkloadIdentityPoolProviderKey in a WorkloadIdentityPoolProvider. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent provider resource to create the key in. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `providers_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"). + * `:workloadIdentityPoolProviderKeyId` (*type:* `String.t`) - Required. The ID to use for the key, which becomes the final component of the resource name. This value should be 4-32 characters, and may contain the characters [a-z0-9-]. + * `:body` (*type:* `GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_providers_keys_create( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_providers_keys_create( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + providers_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, + :workloadIdentityPoolProviderKeyId => :query, + :body => :body + } + + request = + Request.new() + |> Request.method(:post) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Deletes an WorkloadIdentityPoolProviderKey. You can undelete a key for 30 days. After 30 days, deletion is permanent. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the encryption key to delete. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `keys_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.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_providers_keys_delete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_providers_keys_delete( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + providers_id, + keys_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}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_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.IAM.V1.Model.Operation{}]) + end + + @doc """ + Gets an individual WorkloadIdentityPoolProviderKey. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the key to retrieve. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `keys_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.IAM.V1.Model.WorkloadIdentityPoolProviderKey{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_providers_keys_get( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_providers_keys_get( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + providers_id, + keys_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}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_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.IAM.V1.Model.WorkloadIdentityPoolProviderKey{}] + ) + end + + @doc """ + Lists all non-deleted WorkloadIdentityPoolProviderKeys in a project. If show_deleted is set to `true`, then deleted pools are also listed. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `parent`. Required. The parent provider resource to list encryption keys for. + * `locations_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `parent`. See documentation of `projectsId`. + * `providers_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()`) - The maximum number of keys to return. If unspecified, all keys are returned. The maximum value is 10; values above 10 are truncated to 10. + * `:pageToken` (*type:* `String.t`) - A page token, received from a previous `ListWorkloadIdentityPoolProviderKeys` call. Provide this to retrieve the subsequent page. + * `:showDeleted` (*type:* `boolean()`) - Whether to return soft deleted resources as well. + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_providers_keys_list( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_providers_keys_list( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + providers_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, + :showDeleted => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url( + "/v1/projects/{projectsId}/locations/{locationsId}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_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.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse{}] + ) + end + + @doc """ + Undeletes an WorkloadIdentityPoolProviderKey, as long as it was deleted fewer than 30 days ago. + + ## Parameters + + * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The name of the encryption key to undelete. + * `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `workload_identity_pools_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `providers_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. + * `keys_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"). + * `:body` (*type:* `GoogleApi.IAM.V1.Model.UndeleteWorkloadIdentityPoolProviderKeyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.IAM.V1.Model.Operation{}}` on success + * `{:error, info}` on failure + """ + @spec iam_projects_locations_workload_identity_pools_providers_keys_undelete( + Tesla.Env.client(), + String.t(), + String.t(), + String.t(), + String.t(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.IAM.V1.Model.Operation.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def iam_projects_locations_workload_identity_pools_providers_keys_undelete( + connection, + projects_id, + locations_id, + workload_identity_pools_id, + providers_id, + keys_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}/workloadIdentityPools/{workloadIdentityPoolsId}/providers/{providersId}/keys/{keysId}:undelete", + %{ + "projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1), + "locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1), + "workloadIdentityPoolsId" => + URI.encode(workload_identity_pools_id, &URI.char_unreserved?/1), + "providersId" => URI.encode(providers_id, &URI.char_unreserved?/1), + "keysId" => URI.encode(keys_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.IAM.V1.Model.Operation{}]) + end + @doc """ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. @@ -1804,7 +2544,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -1879,7 +2619,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -1955,7 +2695,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2031,7 +2771,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2254,7 +2994,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `serviceAccount.name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. + * `projects_id` (*type:* `String.t`) - Part of `serviceAccount.name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `serviceAccount.name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2410,7 +3150,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2486,7 +3226,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. Deprecated. [Migrate to Service Account Credentials API](https://cloud.google.com/iam/help/credentials/migrate-api). The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2641,7 +3381,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2717,7 +3457,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2794,7 +3534,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -2870,7 +3610,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -2951,7 +3691,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -3034,7 +3774,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -3117,7 +3857,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}/keys/{KEY_ID}` * `projects/-/serviceAccounts/{UNIQUE_ID}/keys/{KEY_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account key `projects/-/serviceAccounts/fake@example.com/keys/fake-key`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `keys_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters @@ -3200,7 +3940,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. Required. The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. @@ -3276,7 +4016,7 @@ defmodule GoogleApi.IAM.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.IAM.V1.Connection.t`) - Connection to server - * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. + * `projects_id` (*type:* `String.t`) - Part of `name`. The resource name of the service account key. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `service_accounts_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. diff --git a/clients/iam/lib/google_api/iam/v1/metadata.ex b/clients/iam/lib/google_api/iam/v1/metadata.ex index fda27e64c3..620a4e0f26 100644 --- a/clients/iam/lib/google_api/iam/v1/metadata.ex +++ b/clients/iam/lib/google_api/iam/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.IAM.V1 do API client metadata for GoogleApi.IAM.V1. """ - @discovery_revision "20221013" + @discovery_revision "20240307" def discovery_revision(), do: @discovery_revision end diff --git a/clients/iam/lib/google_api/iam/v1/model/access_restrictions.ex b/clients/iam/lib/google_api/iam/v1/model/access_restrictions.ex new file mode 100644 index 0000000000..19937c9b99 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/access_restrictions.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.IAM.V1.Model.AccessRestrictions do + @moduledoc """ + Access related restrictions on the workforce pool. + + ## Attributes + + * `allowedServices` (*type:* `list(GoogleApi.IAM.V1.Model.ServiceConfig.t)`, *default:* `nil`) - Optional. Immutable. Services allowed for web sign-in with the workforce pool. If not set by default there are no restrictions. + * `disableProgrammaticSignin` (*type:* `boolean()`, *default:* `nil`) - Optional. Disable programmatic sign-in by disabling token issue via the Security Token API endpoint. See [Security Token Service API] (https://cloud.google.com/iam/docs/reference/sts/rest). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :allowedServices => list(GoogleApi.IAM.V1.Model.ServiceConfig.t()) | nil, + :disableProgrammaticSignin => boolean() | nil + } + + field(:allowedServices, as: GoogleApi.IAM.V1.Model.ServiceConfig, type: :list) + field(:disableProgrammaticSignin) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.AccessRestrictions do + def decode(value, options) do + GoogleApi.IAM.V1.Model.AccessRestrictions.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.AccessRestrictions do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/binding.ex b/clients/iam/lib/google_api/iam/v1/model/binding.ex index ea5b7dc489..9681d842de 100644 --- a/clients/iam/lib/google_api/iam/v1/model/binding.ex +++ b/clients/iam/lib/google_api/iam/v1/model/binding.ex @@ -22,8 +22,8 @@ defmodule GoogleApi.IAM.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.IAM.V1.Model.Expr.t`, *default:* `nil`) - The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). - * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. - * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. + * `members` (*type:* `list(String.t)`, *default:* `nil`) - Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`. + * `role` (*type:* `String.t`, *default:* `nil`) - Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles). """ use GoogleApi.Gax.ModelBase diff --git a/clients/iam/lib/google_api/iam/v1/model/get_iam_policy_request.ex b/clients/iam/lib/google_api/iam/v1/model/get_iam_policy_request.ex new file mode 100644 index 0000000000..95b0c1a015 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/get_iam_policy_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.IAM.V1.Model.GetIamPolicyRequest do + @moduledoc """ + Request message for `GetIamPolicy` method. + + ## Attributes + + * `options` (*type:* `GoogleApi.IAM.V1.Model.GetPolicyOptions.t`, *default:* `nil`) - OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :options => GoogleApi.IAM.V1.Model.GetPolicyOptions.t() | nil + } + + field(:options, as: GoogleApi.IAM.V1.Model.GetPolicyOptions) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.GetIamPolicyRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GetIamPolicyRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.GetIamPolicyRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/get_policy_options.ex b/clients/iam/lib/google_api/iam/v1/model/get_policy_options.ex new file mode 100644 index 0000000000..ee80fd121b --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/get_policy_options.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.IAM.V1.Model.GetPolicyOptions do + @moduledoc """ + Encapsulates settings provided to GetIamPolicy. + + ## Attributes + + * `requestedPolicyVersion` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :requestedPolicyVersion => integer() | nil + } + + field(:requestedPolicyVersion) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.GetPolicyOptions do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GetPolicyOptions.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.GetPolicyOptions do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc.ex b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc.ex new file mode 100644 index 0000000000..30fcdd3711 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc.ex @@ -0,0 +1,67 @@ +# 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.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc do + @moduledoc """ + Represents an OpenId Connect 1.0 identity provider. + + ## Attributes + + * `clientId` (*type:* `String.t`, *default:* `nil`) - Required. The client ID. Must match the audience claim of the JWT issued by the identity provider. + * `clientSecret` (*type:* `GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret.t`, *default:* `nil`) - The optional client secret. Required to enable Authorization Code flow for web sign-in. + * `issuerUri` (*type:* `String.t`, *default:* `nil`) - Required. The OIDC issuer URI. Must be a valid URI using the 'https' scheme. + * `jwksJson` (*type:* `String.t`, *default:* `nil`) - OIDC JWKs in JSON String format. For details on the definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, the `jwks_uri` from the discovery document(fetched from the .well-known path of the `issuer_uri`) will be used. Currently, RSA and EC asymmetric keys are supported. The JWK must use following format and include only the following fields: { "keys": [ { "kty": "RSA/EC", "alg": "", "use": "sig", "kid": "", "n": "", "e": "", "x": "", "y": "", "crv": "" } ] } + * `webSsoConfig` (*type:* `GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig.t`, *default:* `nil`) - Required. Configuration for web single sign-on for the OIDC provider. Here, web sign-in refers to console sign-in and gcloud sign-in through the browser. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :clientId => String.t() | nil, + :clientSecret => + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret.t() | nil, + :issuerUri => String.t() | nil, + :jwksJson => String.t() | nil, + :webSsoConfig => + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig.t() | nil + } + + field(:clientId) + + field(:clientSecret, + as: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret + ) + + field(:issuerUri) + field(:jwksJson) + + field(:webSsoConfig, + as: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig + ) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret.ex b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret.ex new file mode 100644 index 0000000000..6476453ad2 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret.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.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret do + @moduledoc """ + Representation of a client secret configured for the OIDC provider. + + ## Attributes + + * `value` (*type:* `GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue.t`, *default:* `nil`) - The value of the client secret. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :value => + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue.t() + | nil + } + + field(:value, + as: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue + ) +end + +defimpl Poison.Decoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecret do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret_value.ex b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret_value.ex new file mode 100644 index 0000000000..990a4d1b5e --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_client_secret_value.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.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue do + @moduledoc """ + Representation of the value of the client secret. + + ## Attributes + + * `plainText` (*type:* `String.t`, *default:* `nil`) - Input only. The plain text of the client secret value. For security reasons, this field is only used for input and will never be populated in any response. + * `thumbprint` (*type:* `String.t`, *default:* `nil`) - Output only. A thumbprint to represent the current client secret value. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :plainText => String.t() | nil, + :thumbprint => String.t() | nil + } + + field(:plainText) + field(:thumbprint) +end + +defimpl Poison.Decoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcClientSecretValue do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_web_sso_config.ex b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_web_sso_config.ex new file mode 100644 index 0000000000..29e18202c4 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_oidc_web_sso_config.ex @@ -0,0 +1,57 @@ +# 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.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig do + @moduledoc """ + Configuration for web single sign-on for the OIDC provider. + + ## Attributes + + * `additionalScopes` (*type:* `list(String.t)`, *default:* `nil`) - Additional scopes to request for in the OIDC authentication request on top of scopes requested by default. By default, the `openid`, `profile` and `email` scopes that are supported by the identity provider are requested. Each additional scope may be at most 256 characters. A maximum of 10 additional scopes may be configured. + * `assertionClaimsBehavior` (*type:* `String.t`, *default:* `nil`) - Required. The behavior for how OIDC Claims are included in the `assertion` object used for attribute mapping and attribute condition. + * `responseType` (*type:* `String.t`, *default:* `nil`) - Required. The Response Type to request for in the OIDC Authorization Request for web sign-in. The `CODE` Response Type is recommended to avoid the Implicit Flow, for security reasons. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :additionalScopes => list(String.t()) | nil, + :assertionClaimsBehavior => String.t() | nil, + :responseType => String.t() | nil + } + + field(:additionalScopes, type: :list) + field(:assertionClaimsBehavior) + field(:responseType) +end + +defimpl Poison.Decoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig.decode( + value, + options + ) + end +end + +defimpl Poison.Encoder, + for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidcWebSsoConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_saml.ex b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_saml.ex new file mode 100644 index 0000000000..0dc2a7eed7 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/google_iam_admin_v1_workforce_pool_provider_saml.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.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml do + @moduledoc """ + Represents a SAML identity provider. + + ## Attributes + + * `idpMetadataXml` (*type:* `String.t`, *default:* `nil`) - Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://docs.oasis-open.org/security/saml/v2.0/saml-metadata-2.0-os.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 15 years in the future. 4) Up to 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at least one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :idpMetadataXml => String.t() | nil + } + + field(:idpMetadataXml) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml do + def decode(value, options) do + GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/key_data.ex b/clients/iam/lib/google_api/iam/v1/model/key_data.ex new file mode 100644 index 0000000000..2e9a07e2f3 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/key_data.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.IAM.V1.Model.KeyData do + @moduledoc """ + Represents a public key data along with its format. + + ## Attributes + + * `format` (*type:* `String.t`, *default:* `nil`) - Output only. The format of the key. + * `key` (*type:* `String.t`, *default:* `nil`) - Output only. The key data. The format of the key is represented by the format field. + * `keySpec` (*type:* `String.t`, *default:* `nil`) - Required. The specifications for the key. + * `notAfterTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Latest timestamp when this key is valid. Attempts to use this key after this time will fail. Only present if the key data represents a X.509 certificate. + * `notBeforeTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Earliest timestamp when this key is valid. Attempts to use this key before this time will fail. Only present if the key data represents a X.509 certificate. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :format => String.t() | nil, + :key => String.t() | nil, + :keySpec => String.t() | nil, + :notAfterTime => DateTime.t() | nil, + :notBeforeTime => DateTime.t() | nil + } + + field(:format) + field(:key) + field(:keySpec) + field(:notAfterTime, as: DateTime) + field(:notBeforeTime, as: DateTime) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.KeyData do + def decode(value, options) do + GoogleApi.IAM.V1.Model.KeyData.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.KeyData do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/lint_policy_request.ex b/clients/iam/lib/google_api/iam/v1/model/lint_policy_request.ex index 0ab0efa890..cebc47e026 100644 --- a/clients/iam/lib/google_api/iam/v1/model/lint_policy_request.ex +++ b/clients/iam/lib/google_api/iam/v1/model/lint_policy_request.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.IAM.V1.Model.LintPolicyRequest do ## Attributes * `condition` (*type:* `GoogleApi.IAM.V1.Model.Expr.t`, *default:* `nil`) - google.iam.v1.Binding.condition object to be linted. - * `fullResourceName` (*type:* `String.t`, *default:* `nil`) - The full resource name of the policy this lint request is about. The name follows the Google Cloud Platform (GCP) resource format. For example, a GCP project with ID `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. The resource name is not used to read the policy instance from the Cloud IAM database. The candidate policy for lint has to be provided in the same request object. + * `fullResourceName` (*type:* `String.t`, *default:* `nil`) - The full resource name of the policy this lint request is about. The name follows the Google Cloud format for full resource names. For example, a Cloud project with ID `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`. The resource name is not used to read a policy from IAM. Only the data in the request object is linted. """ use GoogleApi.Gax.ModelBase diff --git a/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_provider_keys_response.ex b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_provider_keys_response.ex new file mode 100644 index 0000000000..aea2534007 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_provider_keys_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.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse do + @moduledoc """ + Response message for ListWorkforcePoolProviderKeys. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `workforcePoolProviderKeys` (*type:* `list(GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey.t)`, *default:* `nil`) - A list of WorkforcePoolProviderKeys. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workforcePoolProviderKeys => + list(GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey.t()) | nil + } + + field(:nextPageToken) + + field(:workforcePoolProviderKeys, + as: GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse do + def decode(value, options) do + GoogleApi.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolProviderKeysResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_providers_response.ex b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_providers_response.ex new file mode 100644 index 0000000000..adcd12093f --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pool_providers_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.IAM.V1.Model.ListWorkforcePoolProvidersResponse do + @moduledoc """ + Response message for ListWorkforcePoolProviders. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `workforcePoolProviders` (*type:* `list(GoogleApi.IAM.V1.Model.WorkforcePoolProvider.t)`, *default:* `nil`) - A list of providers. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workforcePoolProviders => list(GoogleApi.IAM.V1.Model.WorkforcePoolProvider.t()) | nil + } + + field(:nextPageToken) + field(:workforcePoolProviders, as: GoogleApi.IAM.V1.Model.WorkforcePoolProvider, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolProvidersResponse do + def decode(value, options) do + GoogleApi.IAM.V1.Model.ListWorkforcePoolProvidersResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolProvidersResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/list_workforce_pools_response.ex b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pools_response.ex new file mode 100644 index 0000000000..935db613fd --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/list_workforce_pools_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.IAM.V1.Model.ListWorkforcePoolsResponse do + @moduledoc """ + Response message for ListWorkforcePools. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `workforcePools` (*type:* `list(GoogleApi.IAM.V1.Model.WorkforcePool.t)`, *default:* `nil`) - A list of pools. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workforcePools => list(GoogleApi.IAM.V1.Model.WorkforcePool.t()) | nil + } + + field(:nextPageToken) + field(:workforcePools, as: GoogleApi.IAM.V1.Model.WorkforcePool, type: :list) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolsResponse do + def decode(value, options) do + GoogleApi.IAM.V1.Model.ListWorkforcePoolsResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.ListWorkforcePoolsResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/list_workload_identity_pool_provider_keys_response.ex b/clients/iam/lib/google_api/iam/v1/model/list_workload_identity_pool_provider_keys_response.ex new file mode 100644 index 0000000000..23f6a97290 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/list_workload_identity_pool_provider_keys_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.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse do + @moduledoc """ + Response message for ListWorkloadIdentityPoolProviderKeys. + + ## Attributes + + * `nextPageToken` (*type:* `String.t`, *default:* `nil`) - A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no subsequent pages. + * `workloadIdentityPoolProviderKeys` (*type:* `list(GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey.t)`, *default:* `nil`) - A list of WorkloadIdentityPoolProviderKey + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :nextPageToken => String.t() | nil, + :workloadIdentityPoolProviderKeys => + list(GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey.t()) | nil + } + + field(:nextPageToken) + + field(:workloadIdentityPoolProviderKeys, + as: GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey, + type: :list + ) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse do + def decode(value, options) do + GoogleApi.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.ListWorkloadIdentityPoolProviderKeysResponse do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/oidc.ex b/clients/iam/lib/google_api/iam/v1/model/oidc.ex index 03b72d84df..8a39df9cf3 100644 --- a/clients/iam/lib/google_api/iam/v1/model/oidc.ex +++ b/clients/iam/lib/google_api/iam/v1/model/oidc.ex @@ -23,17 +23,20 @@ defmodule GoogleApi.IAM.V1.Model.Oidc do * `allowedAudiences` (*type:* `list(String.t)`, *default:* `nil`) - Acceptable values for the `aud` field (audience) in the OIDC token. Token exchange requests are rejected if the token audience does not match one of the configured values. Each audience may be at most 256 characters. A maximum of 10 audiences may be configured. If this list is empty, the OIDC token audience must be equal to the full canonical resource name of the WorkloadIdentityPoolProvider, with or without the HTTPS prefix. For example: ``` //iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ https://iam.googleapis.com/projects//locations//workloadIdentityPools//providers/ ``` * `issuerUri` (*type:* `String.t`, *default:* `nil`) - Required. The OIDC issuer URL. Must be an HTTPS endpoint. + * `jwksJson` (*type:* `String.t`, *default:* `nil`) - Optional. OIDC JWKs in JSON String format. For details on the definition of a JWK, see https://tools.ietf.org/html/rfc7517. If not set, the `jwks_uri` from the discovery document(fetched from the .well-known path of the `issuer_uri`) will be used. Currently, RSA and EC asymmetric keys are supported. The JWK must use following format and include only the following fields: { "keys": [ { "kty": "RSA/EC", "alg": "", "use": "sig", "kid": "", "n": "", "e": "", "x": "", "y": "", "crv": "" } ] } """ use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ :allowedAudiences => list(String.t()) | nil, - :issuerUri => String.t() | nil + :issuerUri => String.t() | nil, + :jwksJson => String.t() | nil } field(:allowedAudiences, type: :list) field(:issuerUri) + field(:jwksJson) end defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.Oidc do diff --git a/clients/iam/lib/google_api/iam/v1/model/operation.ex b/clients/iam/lib/google_api/iam/v1/model/operation.ex index 11a43d332e..f50930d5c1 100644 --- a/clients/iam/lib/google_api/iam/v1/model/operation.ex +++ b/clients/iam/lib/google_api/iam/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.IAM.V1.Model.Operation do * `error` (*type:* `GoogleApi.IAM.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/iam/lib/google_api/iam/v1/model/operation_metadata.ex b/clients/iam/lib/google_api/iam/v1/model/operation_metadata.ex new file mode 100644 index 0000000000..90d844c464 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/operation_metadata.ex @@ -0,0 +1,64 @@ +# 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.IAM.V1.Model.OperationMetadata do + @moduledoc """ + Represents the metadata of the long-running operation. + + ## Attributes + + * `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation. + * `cancelRequested` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have been cancelled successfully have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`. + * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created. + * `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running. + * `statusDetail` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any. + * `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation. + * `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :apiVersion => String.t() | nil, + :cancelRequested => boolean() | nil, + :createTime => DateTime.t() | nil, + :endTime => DateTime.t() | nil, + :statusDetail => String.t() | nil, + :target => String.t() | nil, + :verb => String.t() | nil + } + + field(:apiVersion) + field(:cancelRequested) + field(:createTime, as: DateTime) + field(:endTime, as: DateTime) + field(:statusDetail) + field(:target) + field(:verb) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.OperationMetadata do + def decode(value, options) do + GoogleApi.IAM.V1.Model.OperationMetadata.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.OperationMetadata do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/policy.ex b/clients/iam/lib/google_api/iam/v1/model/policy.ex index 9e689fcb88..51435d2831 100644 --- a/clients/iam/lib/google_api/iam/v1/model/policy.ex +++ b/clients/iam/lib/google_api/iam/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.IAM.V1.Model.Policy do @moduledoc """ - An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } **YAML example:** bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). + An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { "bindings": [ { "role": "roles/resourcemanager.organizationAdmin", "members": [ "user:mike@example.com", "group:admins@example.com", "domain:google.com", "serviceAccount:my-project-id@appspot.gserviceaccount.com" ] }, { "role": "roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com" ], "condition": { "title": "expirable access", "description": "Does not grant access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:00:00.000Z')", } } ], "etag": "BwWWja0YfJA=", "version": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/). ## Attributes diff --git a/clients/iam/lib/google_api/iam/v1/model/role.ex b/clients/iam/lib/google_api/iam/v1/model/role.ex index e778ad6e21..54de13ffe0 100644 --- a/clients/iam/lib/google_api/iam/v1/model/role.ex +++ b/clients/iam/lib/google_api/iam/v1/model/role.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.IAM.V1.Model.Role do * `description` (*type:* `String.t`, *default:* `nil`) - Optional. A human-readable description for the role. * `etag` (*type:* `String.t`, *default:* `nil`) - Used to perform a consistent read-modify-write. * `includedPermissions` (*type:* `list(String.t)`, *default:* `nil`) - The names of the permissions this role grants when bound in an IAM policy. - * `name` (*type:* `String.t`, *default:* `nil`) - The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. + * `name` (*type:* `String.t`, *default:* `nil`) - The name of the role. When `Role` is used in `CreateRole`, the role name must not be set. When `Role` is used in output and other input such as `UpdateRole`, the role name is the complete path. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/my-role` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/my-role` for project-level custom roles. * `stage` (*type:* `String.t`, *default:* `nil`) - The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role. * `title` (*type:* `String.t`, *default:* `nil`) - Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. """ diff --git a/clients/iam/lib/google_api/iam/v1/model/saml.ex b/clients/iam/lib/google_api/iam/v1/model/saml.ex index eaa5fb2062..81ee6ee3f6 100644 --- a/clients/iam/lib/google_api/iam/v1/model/saml.ex +++ b/clients/iam/lib/google_api/iam/v1/model/saml.ex @@ -21,7 +21,7 @@ defmodule GoogleApi.IAM.V1.Model.Saml do ## Attributes - * `idpMetadataXml` (*type:* `String.t`, *default:* `nil`) - Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://www.oasis-open.org/committees/download.php/56785/sstc-saml-metadata-errata-2.0-wd-05.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 14 years in the future. 4) Upto 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at lease one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata + * `idpMetadataXml` (*type:* `String.t`, *default:* `nil`) - Required. SAML Identity provider configuration metadata xml doc. The xml document should comply with [SAML 2.0 specification](https://www.oasis-open.org/committees/download.php/56785/sstc-saml-metadata-errata-2.0-wd-05.pdf). The max size of the acceptable xml document will be bounded to 128k characters. The metadata xml document should satisfy the following constraints: 1) Must contain an Identity Provider Entity ID. 2) Must contain at least one non-expired signing key certificate. 3) For each signing key: a) Valid from should be no more than 7 days from now. b) Valid to should be no more than 15 years in the future. 4) Upto 3 IdP signing keys are allowed in the metadata xml. When updating the provider's metadata xml, at lease one non-expired signing key must overlap with the existing metadata. This requirement is skipped if there are no non-expired signing keys present in the existing metadata """ use GoogleApi.Gax.ModelBase diff --git a/clients/iam/lib/google_api/iam/v1/model/service_account.ex b/clients/iam/lib/google_api/iam/v1/model/service_account.ex index 08761e1b57..61eb5b0bab 100644 --- a/clients/iam/lib/google_api/iam/v1/model/service_account.ex +++ b/clients/iam/lib/google_api/iam/v1/model/service_account.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.IAM.V1.Model.ServiceAccount do @moduledoc """ - An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service // + An IAM service account. A service account is an account for an application or a virtual machine (VM) instance, not a person. You can use a service account to call Google APIs. To learn more, read the [overview of service accounts](https://cloud.google.com/iam/help/service-accounts/overview). When you create a service account, you specify the project ID that owns the service account, as well as a name that must be unique within the project. IAM uses these values to create an email address that identifies the service account. // ## Attributes @@ -26,7 +26,7 @@ defmodule GoogleApi.IAM.V1.Model.ServiceAccount do * `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. A user-specified, human-readable name for the service account. The maximum length is 100 UTF-8 bytes. * `email` (*type:* `String.t`, *default:* `nil`) - Output only. The email address of the service account. * `etag` (*type:* `String.t`, *default:* `nil`) - Deprecated. Do not use. - * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to get the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. + * `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the service account. Use one of the following formats: * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}` * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}` As an alternative, you can use the `-` wildcard character instead of the project ID: * `projects/-/serviceAccounts/{EMAIL_ADDRESS}` * `projects/-/serviceAccounts/{UNIQUE_ID}` When possible, avoid using the `-` wildcard character, because it can cause response messages to contain misleading error codes. For example, if you try to access the service account `projects/-/serviceAccounts/fake@example.com`, which does not exist, the response contains an HTTP `403 Forbidden` error instead of a `404 Not Found` error. * `oauth2ClientId` (*type:* `String.t`, *default:* `nil`) - Output only. The OAuth 2.0 client ID for the service account. * `projectId` (*type:* `String.t`, *default:* `nil`) - Output only. The ID of the project that owns the service account. * `uniqueId` (*type:* `String.t`, *default:* `nil`) - Output only. The unique, stable numeric ID for the service account. Each service account retains its unique ID even if you delete the service account. For example, if you delete a service account, then create a new service account with the same name, the new service account has a different unique ID than the deleted service account. diff --git a/clients/iam/lib/google_api/iam/v1/model/service_config.ex b/clients/iam/lib/google_api/iam/v1/model/service_config.ex new file mode 100644 index 0000000000..25656cab42 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/service_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.IAM.V1.Model.ServiceConfig do + @moduledoc """ + Configuration for a service. + + ## Attributes + + * `domain` (*type:* `String.t`, *default:* `nil`) - Optional. Domain name of the service. Example: console.cloud.google + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :domain => String.t() | nil + } + + field(:domain) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.ServiceConfig do + def decode(value, options) do + GoogleApi.IAM.V1.Model.ServiceConfig.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.ServiceConfig do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_key_request.ex b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_key_request.ex new file mode 100644 index 0000000000..6625ce6a11 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_key_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.IAM.V1.Model.UndeleteWorkforcePoolProviderKeyRequest do + @moduledoc """ + Request message for UndeleteWorkforcePoolProviderKey. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderKeyRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderKeyRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderKeyRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_request.ex b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_request.ex new file mode 100644 index 0000000000..1fb7074b02 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_provider_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.IAM.V1.Model.UndeleteWorkforcePoolProviderRequest do + @moduledoc """ + Request message for UndeleteWorkforcePoolProvider. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolProviderRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_request.ex b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_request.ex new file mode 100644 index 0000000000..0f5f5b5ffc --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_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.IAM.V1.Model.UndeleteWorkforcePoolRequest do + @moduledoc """ + Request message for UndeleteWorkforcePool. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_subject_request.ex b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_subject_request.ex new file mode 100644 index 0000000000..8eb867e6cb --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/undelete_workforce_pool_subject_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.IAM.V1.Model.UndeleteWorkforcePoolSubjectRequest do + @moduledoc """ + Request message for UndeleteWorkforcePoolSubject. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolSubjectRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolSubjectRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkforcePoolSubjectRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/undelete_workload_identity_pool_provider_key_request.ex b/clients/iam/lib/google_api/iam/v1/model/undelete_workload_identity_pool_provider_key_request.ex new file mode 100644 index 0000000000..d7d62b991a --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/undelete_workload_identity_pool_provider_key_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.IAM.V1.Model.UndeleteWorkloadIdentityPoolProviderKeyRequest do + @moduledoc """ + Request message for UndeleteWorkloadIdentityPoolProviderKey. + + ## Attributes + + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{} +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkloadIdentityPoolProviderKeyRequest do + def decode(value, options) do + GoogleApi.IAM.V1.Model.UndeleteWorkloadIdentityPoolProviderKeyRequest.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.UndeleteWorkloadIdentityPoolProviderKeyRequest do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/workforce_pool.ex b/clients/iam/lib/google_api/iam/v1/model/workforce_pool.ex new file mode 100644 index 0000000000..8b81092187 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/workforce_pool.ex @@ -0,0 +1,70 @@ +# 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.IAM.V1.Model.WorkforcePool do + @moduledoc """ + Represents a collection of external workforces. Provides namespaces for federated users that can be referenced in IAM policies. + + ## Attributes + + * `accessRestrictions` (*type:* `GoogleApi.IAM.V1.Model.AccessRestrictions.t`, *default:* `nil`) - Optional. Configure access restrictions on the workforce pool users. This is an optional field. If specified web sign-in can be restricted to given set of services or programmatic sign-in can be disabled for pool users. + * `description` (*type:* `String.t`, *default:* `nil`) - A user-specified description of the pool. Cannot exceed 256 characters. + * `disabled` (*type:* `boolean()`, *default:* `nil`) - Disables the workforce pool. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again. + * `displayName` (*type:* `String.t`, *default:* `nil`) - A user-specified display name of the pool in Google Cloud Console. Cannot exceed 32 characters. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which the workforce pool will be permanently purged and cannot be recovered. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the pool. Format: `locations/{location}/workforcePools/{workforce_pool_id}` + * `parent` (*type:* `String.t`, *default:* `nil`) - Immutable. The resource name of the parent. Format: `organizations/{org-id}`. + * `sessionDuration` (*type:* `String.t`, *default:* `nil`) - Duration that the Google Cloud access tokens, console sign-in sessions, and `gcloud` sign-in sessions from this pool are valid. Must be greater than 15 minutes (900s) and less than 12 hours (43200s). If `session_duration` is not configured, minted credentials have a default duration of one hour (3600s). For SAML providers, the lifetime of the token is the minimum of the `session_duration` and the `SessionNotOnOrAfter` claim in the SAML assertion. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the pool. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :accessRestrictions => GoogleApi.IAM.V1.Model.AccessRestrictions.t() | nil, + :description => String.t() | nil, + :disabled => boolean() | nil, + :displayName => String.t() | nil, + :expireTime => DateTime.t() | nil, + :name => String.t() | nil, + :parent => String.t() | nil, + :sessionDuration => String.t() | nil, + :state => String.t() | nil + } + + field(:accessRestrictions, as: GoogleApi.IAM.V1.Model.AccessRestrictions) + field(:description) + field(:disabled) + field(:displayName) + field(:expireTime, as: DateTime) + field(:name) + field(:parent) + field(:sessionDuration) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.WorkforcePool do + def decode(value, options) do + GoogleApi.IAM.V1.Model.WorkforcePool.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.WorkforcePool do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider.ex b/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider.ex new file mode 100644 index 0000000000..f123f16269 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider.ex @@ -0,0 +1,73 @@ +# 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.IAM.V1.Model.WorkforcePoolProvider do + @moduledoc """ + A configuration for an external identity provider. + + ## Attributes + + * `attributeCondition` (*type:* `String.t`, *default:* `nil`) - A [Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. `google.profile_photo`, `google.display_name` and `google.posix_username` are not supported. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credentials will be accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` "'admins' in google.groups" ``` + * `attributeMapping` (*type:* `map()`, *default:* `nil`) - Required. Maps attributes from the authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. This is a required field and the mapped subject cannot exceed 127 bytes. * `google.groups`: Groups the authenticating user belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. * `google.display_name`: The name of the authenticated user. This is an optional field and the mapped display name cannot exceed 100 bytes. If not set, `google.subject` will be displayed instead. This attribute cannot be referenced in IAM bindings. * `google.profile_photo`: The URL that specifies the authenticated user's thumbnail photo. This is an optional field. When set, the image will be visible as the user's profile picture. If not set, a generic user icon will be displayed instead. This attribute cannot be referenced in IAM bindings. * `google.posix_username`: The linux username used by OS login. This is an optional field and the mapped posix username cannot exceed 32 characters, The key must match the regex "^a-zA-Z0-9._{0,31}$". This attribute cannot be referenced in IAM bindings. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where {custom_attribute} is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workforce pool to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/locations/global/workforcePools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 4KB. For OIDC providers, you must supply a custom mapping that includes the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {"google.subject": "assertion.sub"} ``` + * `description` (*type:* `String.t`, *default:* `nil`) - A user-specified description of the provider. Cannot exceed 256 characters. + * `disabled` (*type:* `boolean()`, *default:* `nil`) - Disables the workforce pool provider. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access. + * `displayName` (*type:* `String.t`, *default:* `nil`) - A user-specified display name for the provider. Cannot exceed 32 characters. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which the workload pool provider will be permanently purged and cannot be recovered. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the provider. Format: `locations/{location}/workforcePools/{workforce_pool_id}/providers/{provider_id}` + * `oidc` (*type:* `GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc.t`, *default:* `nil`) - An OpenId Connect 1.0 identity provider configuration. + * `saml` (*type:* `GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml.t`, *default:* `nil`) - A SAML identity provider configuration. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the provider. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :attributeCondition => String.t() | nil, + :attributeMapping => map() | nil, + :description => String.t() | nil, + :disabled => boolean() | nil, + :displayName => String.t() | nil, + :expireTime => DateTime.t() | nil, + :name => String.t() | nil, + :oidc => GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc.t() | nil, + :saml => GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml.t() | nil, + :state => String.t() | nil + } + + field(:attributeCondition) + field(:attributeMapping, type: :map) + field(:description) + field(:disabled) + field(:displayName) + field(:expireTime, as: DateTime) + field(:name) + field(:oidc, as: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderOidc) + field(:saml, as: GoogleApi.IAM.V1.Model.GoogleIamAdminV1WorkforcePoolProviderSaml) + field(:state) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.WorkforcePoolProvider do + def decode(value, options) do + GoogleApi.IAM.V1.Model.WorkforcePoolProvider.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.WorkforcePoolProvider do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider_key.ex b/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider_key.ex new file mode 100644 index 0000000000..f73d3c3ebc --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/workforce_pool_provider_key.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.IAM.V1.Model.WorkforcePoolProviderKey do + @moduledoc """ + Represents a public key configuration for a Workforce Pool Provider. The key can be configured in your identity provider to encrypt SAML assertions. Google holds the corresponding private key, which it uses to decrypt encrypted tokens. + + ## Attributes + + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time after which the key will be permanently deleted and cannot be recovered. Note that the key may get purged before this time if the total limit of keys per provider is exceeded. + * `keyData` (*type:* `GoogleApi.IAM.V1.Model.KeyData.t`, *default:* `nil`) - Immutable. Public half of the asymmetric key. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the key. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the key. + * `use` (*type:* `String.t`, *default:* `nil`) - Required. The purpose of the key. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :expireTime => DateTime.t() | nil, + :keyData => GoogleApi.IAM.V1.Model.KeyData.t() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :use => String.t() | nil + } + + field(:expireTime, as: DateTime) + field(:keyData, as: GoogleApi.IAM.V1.Model.KeyData) + field(:name) + field(:state) + field(:use) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey do + def decode(value, options) do + GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.WorkforcePoolProviderKey do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool.ex b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool.ex index 96a585ed2a..2e1a5ca72a 100644 --- a/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool.ex +++ b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool.ex @@ -17,13 +17,14 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPool do @moduledoc """ - Represents a collection of external workload identities. You can define IAM policies to grant these identities access to Google Cloud resources. + Represents a collection of workload identities. You can define IAM policies to grant these identities access to Google Cloud resources. ## Attributes * `description` (*type:* `String.t`, *default:* `nil`) - A description of the pool. Cannot exceed 256 characters. * `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again. * `displayName` (*type:* `String.t`, *default:* `nil`) - A display name for the pool. Cannot exceed 32 characters. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which the workload identity pool will be permanently purged and cannot be recovered. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the pool. * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the pool. """ @@ -34,6 +35,7 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPool do :description => String.t() | nil, :disabled => boolean() | nil, :displayName => String.t() | nil, + :expireTime => DateTime.t() | nil, :name => String.t() | nil, :state => String.t() | nil } @@ -41,6 +43,7 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPool do field(:description) field(:disabled) field(:displayName) + field(:expireTime, as: DateTime) field(:name) field(:state) end diff --git a/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider.ex b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider.ex index b7bc5ba43d..e2f0f4ee1c 100644 --- a/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider.ex +++ b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider.ex @@ -22,11 +22,12 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProvider do ## Attributes * `attributeCondition` (*type:* `String.t`, *default:* `nil`) - [A Common Expression Language](https://opensource.google/projects/cel) expression, in plain text, to restrict what otherwise valid authentication credentials issued by the provider should not be accepted. The expression must output a boolean representing whether to allow the federation. The following keywords may be referenced in the expressions: * `assertion`: JSON representing the authentication credential issued by the provider. * `google`: The Google attributes mapped from the assertion in the `attribute_mappings`. * `attribute`: The custom attributes mapped from the assertion in the `attribute_mappings`. The maximum length of the attribute condition expression is 4096 characters. If unspecified, all valid authentication credential are accepted. The following example shows how to only allow credentials with a mapped `google.groups` value of `admins`: ``` "'admins' in google.groups" ``` - * `attributeMapping` (*type:* `map()`, *default:* `nil`) - Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the external identity belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workload to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 8KB. For AWS providers, if no attribute mapping is defined, the following default mapping applies: ``` { "google.subject":"assertion.arn", "attribute.aws_role": "assertion.arn.contains('assumed-role')" " ? assertion.arn.extract('{account_arn}assumed-role/')" " + 'assumed-role/'" " + assertion.arn.extract('assumed-role/{role_name}/')" " : assertion.arn", } ``` If any custom attribute mappings are defined, they must include a mapping to the `google.subject` attribute. For OIDC providers, you must supply a custom mapping, which must include the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {"google.subject": "assertion.sub"} ``` + * `attributeMapping` (*type:* `map()`, *default:* `nil`) - Maps attributes from authentication credentials issued by an external identity provider to Google Cloud attributes, such as `subject` and `segment`. Each key must be a string specifying the Google Cloud IAM attribute to map to. The following keys are supported: * `google.subject`: The principal IAM is authenticating. You can reference this value in IAM bindings. This is also the subject that appears in Cloud Logging logs. Cannot exceed 127 bytes. * `google.groups`: Groups the external identity belongs to. You can grant groups access to resources using an IAM `principalSet` binding; access applies to all members of the group. You can also provide custom attributes by specifying `attribute.{custom_attribute}`, where `{custom_attribute}` is the name of the custom attribute to be mapped. You can define a maximum of 50 custom attributes. The maximum length of a mapped attribute key is 100 characters, and the key may only contain the characters [a-z0-9_]. You can reference these attributes in IAM policies to define fine-grained access for a workload to Google Cloud resources. For example: * `google.subject`: `principal://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/subject/{value}` * `google.groups`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/group/{value}` * `attribute.{custom_attribute}`: `principalSet://iam.googleapis.com/projects/{project}/locations/{location}/workloadIdentityPools/{pool}/attribute.{custom_attribute}/{value}` Each value must be a [Common Expression Language] (https://opensource.google/projects/cel) function that maps an identity provider credential to the normalized attribute specified by the corresponding map key. You can use the `assertion` keyword in the expression to access a JSON representation of the authentication credential issued by the provider. The maximum length of an attribute mapping expression is 2048 characters. When evaluated, the total size of all mapped attributes must not exceed 8KB. For AWS providers, if no attribute mapping is defined, the following default mapping applies: ``` { "google.subject":"assertion.arn", "attribute.aws_role": "assertion.arn.contains('assumed-role')" " ? assertion.arn.extract('{account_arn}assumed-role/')" " + 'assumed-role/'" " + assertion.arn.extract('assumed-role/{role_name}/')" " : assertion.arn", } ``` If any custom attribute mappings are defined, they must include a mapping to the `google.subject` attribute. For OIDC providers, you must supply a custom mapping, which must include the `google.subject` attribute. For example, the following maps the `sub` claim of the incoming credential to the `subject` attribute on a Google token: ``` {"google.subject": "assertion.sub"} ``` * `aws` (*type:* `GoogleApi.IAM.V1.Model.Aws.t`, *default:* `nil`) - An Amazon Web Services identity provider. * `description` (*type:* `String.t`, *default:* `nil`) - A description for the provider. Cannot exceed 256 characters. * `disabled` (*type:* `boolean()`, *default:* `nil`) - Whether the provider is disabled. You cannot use a disabled provider to exchange tokens. However, existing tokens still grant access. * `displayName` (*type:* `String.t`, *default:* `nil`) - A display name for the provider. Cannot exceed 32 characters. + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which the workload identity pool provider will be permanently purged and cannot be recovered. * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the provider. * `oidc` (*type:* `GoogleApi.IAM.V1.Model.Oidc.t`, *default:* `nil`) - An OpenId Connect 1.0 identity provider. * `saml` (*type:* `GoogleApi.IAM.V1.Model.Saml.t`, *default:* `nil`) - An SAML 2.0 identity provider. @@ -42,6 +43,7 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProvider do :description => String.t() | nil, :disabled => boolean() | nil, :displayName => String.t() | nil, + :expireTime => DateTime.t() | nil, :name => String.t() | nil, :oidc => GoogleApi.IAM.V1.Model.Oidc.t() | nil, :saml => GoogleApi.IAM.V1.Model.Saml.t() | nil, @@ -54,6 +56,7 @@ defmodule GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProvider do field(:description) field(:disabled) field(:displayName) + field(:expireTime, as: DateTime) field(:name) field(:oidc, as: GoogleApi.IAM.V1.Model.Oidc) field(:saml, as: GoogleApi.IAM.V1.Model.Saml) diff --git a/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider_key.ex b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider_key.ex new file mode 100644 index 0000000000..1ea96519a9 --- /dev/null +++ b/clients/iam/lib/google_api/iam/v1/model/workload_identity_pool_provider_key.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.IAM.V1.Model.WorkloadIdentityPoolProviderKey do + @moduledoc """ + Represents a public key configuration for your workload identity pool provider. The key can be configured in your identity provider to encrypt the SAML assertions. Google holds the corresponding private key which it uses to decrypt encrypted tokens. + + ## Attributes + + * `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Time after which the key will be permanently purged and cannot be recovered. Note that the key may get purged before this timestamp if the total limit of keys per provider is crossed. + * `keyData` (*type:* `GoogleApi.IAM.V1.Model.KeyData.t`, *default:* `nil`) - Immutable. Public half of the asymmetric key. + * `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the key. + * `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of the key. + * `use` (*type:* `String.t`, *default:* `nil`) - Required. The purpose of the key. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :expireTime => DateTime.t() | nil, + :keyData => GoogleApi.IAM.V1.Model.KeyData.t() | nil, + :name => String.t() | nil, + :state => String.t() | nil, + :use => String.t() | nil + } + + field(:expireTime, as: DateTime) + field(:keyData, as: GoogleApi.IAM.V1.Model.KeyData) + field(:name) + field(:state) + field(:use) +end + +defimpl Poison.Decoder, for: GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey do + def decode(value, options) do + GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.IAM.V1.Model.WorkloadIdentityPoolProviderKey do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end