Skip to content

Commit

Permalink
feat: Automated regeneration of ServiceControl client (#10816)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-12 01:18:12 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 12, 2024
1 parent 3bb397e commit c278f4a
Show file tree
Hide file tree
Showing 13 changed files with 220 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.ServiceControl.V1 do
API client metadata for GoogleApi.ServiceControl.V1.
"""

@discovery_revision "20221014"
@discovery_revision "20240301"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ defmodule GoogleApi.ServiceControl.V1.Model.AuthenticationInfo do
* `principalSubject` (*type:* `String.t`, *default:* `nil`) - String representation of identity of requesting party. Populated for both first and third party identities.
* `serviceAccountDelegationInfo` (*type:* `list(GoogleApi.ServiceControl.V1.Model.ServiceAccountDelegationInfo.t)`, *default:* `nil`) - Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.
* `serviceAccountKeyName` (*type:* `String.t`, *default:* `nil`) - The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
* `serviceDelegationHistory` (*type:* `GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory.t`, *default:* `nil`) - Records the history of delegated resource access across Google services.
* `thirdPartyPrincipal` (*type:* `map()`, *default:* `nil`) - The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.
"""

Expand All @@ -38,6 +39,8 @@ defmodule GoogleApi.ServiceControl.V1.Model.AuthenticationInfo do
:serviceAccountDelegationInfo =>
list(GoogleApi.ServiceControl.V1.Model.ServiceAccountDelegationInfo.t()) | nil,
:serviceAccountKeyName => String.t() | nil,
:serviceDelegationHistory =>
GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory.t() | nil,
:thirdPartyPrincipal => map() | nil
}

Expand All @@ -51,6 +54,7 @@ defmodule GoogleApi.ServiceControl.V1.Model.AuthenticationInfo do
)

field(:serviceAccountKeyName)
field(:serviceDelegationHistory, as: GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory)
field(:thirdPartyPrincipal, type: :map)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,20 @@ defmodule GoogleApi.ServiceControl.V1.Model.CheckInfo do
## Attributes
* `apiKeyUid` (*type:* `String.t`, *default:* `nil`) - The unique id of the api key in the format of "apikey:". This field will be populated when the consumer passed to Chemist is an API key and all the API key related validations are successful.
* `consumerInfo` (*type:* `GoogleApi.ServiceControl.V1.Model.ConsumerInfo.t`, *default:* `nil`) - Consumer info of this check.
* `unusedArguments` (*type:* `list(String.t)`, *default:* `nil`) - A list of fields and label keys that are ignored by the server. The client doesn't need to send them for following requests to improve performance and allow better aggregation.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:apiKeyUid => String.t() | nil,
:consumerInfo => GoogleApi.ServiceControl.V1.Model.ConsumerInfo.t() | nil,
:unusedArguments => list(String.t()) | nil
}

field(:apiKeyUid)
field(:consumerInfo, as: GoogleApi.ServiceControl.V1.Model.ConsumerInfo)
field(:unusedArguments, type: :list)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule GoogleApi.ServiceControl.V1.Model.Resource do
## Attributes
* `annotations` (*type:* `map()`, *default:* `nil`) - Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
* `annotations` (*type:* `map()`, *default:* `nil`) - Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
* `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty.
* `displayName` (*type:* `String.t`, *default:* `nil`) - Mutable. The display name set by clients. Must be <= 63 characters.
Expand Down
Original file line number Diff line number Diff line change
@@ -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.ServiceControl.V1.Model.ServiceDelegationHistory do
@moduledoc """
The history of delegation across multiple services as the result of the original user's action. Such as "service A uses its own account to do something for user B". This differs from ServiceAccountDelegationInfo, which only tracks the history of direct token exchanges (impersonation).
## Attributes
* `originalPrincipal` (*type:* `String.t`, *default:* `nil`) - The original end user who initiated the request to GCP.
* `serviceMetadata` (*type:* `list(GoogleApi.ServiceControl.V1.Model.ServiceMetadata.t)`, *default:* `nil`) - Data identifying the service specific jobs or units of work that were involved in a chain of service calls.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:originalPrincipal => String.t() | nil,
:serviceMetadata => list(GoogleApi.ServiceControl.V1.Model.ServiceMetadata.t()) | nil
}

field(:originalPrincipal)
field(:serviceMetadata, as: GoogleApi.ServiceControl.V1.Model.ServiceMetadata, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory do
def decode(value, options) do
GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ServiceControl.V1.Model.ServiceDelegationHistory do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.ServiceControl.V1.Model.ServiceMetadata do
@moduledoc """
Metadata describing the service and additional service specific information used to identify the job or unit of work at hand.
## Attributes
* `jobMetadata` (*type:* `map()`, *default:* `nil`) - Additional metadata provided by service teams to describe service specific job information that was triggered by the original principal.
* `principalSubject` (*type:* `String.t`, *default:* `nil`) - A string representing the principal_subject associated with the identity. For most identities, the format will be `principal://iam.googleapis.com/{identity pool name}/subject/{subject)` except for some GKE identities (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy format `serviceAccount:{identity pool name}[{subject}]` If the identity is a Google account (e.g. workspace user account or service account), this will be the email of the prefixed by `serviceAccount:`. For example: `serviceAccount:[email protected]`. If the identity is an individual user, the identity will be formatted as: `user:[email protected]`.
* `serviceDomain` (*type:* `String.t`, *default:* `nil`) - The service's fully qualified domain name, e.g. "dataproc.googleapis.com".
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:jobMetadata => map() | nil,
:principalSubject => String.t() | nil,
:serviceDomain => String.t() | nil
}

field(:jobMetadata, type: :map)
field(:principalSubject)
field(:serviceDomain)
end

defimpl Poison.Decoder, for: GoogleApi.ServiceControl.V1.Model.ServiceMetadata do
def decode(value, options) do
GoogleApi.ServiceControl.V1.Model.ServiceMetadata.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ServiceControl.V1.Model.ServiceMetadata do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.ServiceControl.V2 do
API client metadata for GoogleApi.ServiceControl.V2.
"""

@discovery_revision "20221014"
@discovery_revision "20240301"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ defmodule GoogleApi.ServiceControl.V2.Model.AuthenticationInfo do
* `principalSubject` (*type:* `String.t`, *default:* `nil`) - String representation of identity of requesting party. Populated for both first and third party identities.
* `serviceAccountDelegationInfo` (*type:* `list(GoogleApi.ServiceControl.V2.Model.ServiceAccountDelegationInfo.t)`, *default:* `nil`) - Identity delegation history of an authenticated service account that makes the request. It contains information on the real authorities that try to access GCP resources by delegating on a service account. When multiple authorities present, they are guaranteed to be sorted based on the original ordering of the identity delegation events.
* `serviceAccountKeyName` (*type:* `String.t`, *default:* `nil`) - The name of the service account key used to create or exchange credentials for authenticating the service account making the request. This is a scheme-less URI full resource name. For example: "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}"
* `serviceDelegationHistory` (*type:* `GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory.t`, *default:* `nil`) - Records the history of delegated resource access across Google services.
* `thirdPartyPrincipal` (*type:* `map()`, *default:* `nil`) - The third party identification (if any) of the authenticated user making the request. When the JSON object represented here has a proto equivalent, the proto name will be indicated in the `@type` property.
"""

Expand All @@ -38,6 +39,8 @@ defmodule GoogleApi.ServiceControl.V2.Model.AuthenticationInfo do
:serviceAccountDelegationInfo =>
list(GoogleApi.ServiceControl.V2.Model.ServiceAccountDelegationInfo.t()) | nil,
:serviceAccountKeyName => String.t() | nil,
:serviceDelegationHistory =>
GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory.t() | nil,
:thirdPartyPrincipal => map() | nil
}

Expand All @@ -51,6 +54,7 @@ defmodule GoogleApi.ServiceControl.V2.Model.AuthenticationInfo do
)

field(:serviceAccountKeyName)
field(:serviceDelegationHistory, as: GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory)
field(:thirdPartyPrincipal, type: :map)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.ServiceControl.V2.Model.ReportResponse do
@moduledoc """
Response message for the Report method. If the request contains any invalid data, the server returns an RPC error.
Response message for the Report method.
## Attributes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule GoogleApi.ServiceControl.V2.Model.Resource do
## Attributes
* `annotations` (*type:* `map()`, *default:* `nil`) - Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/user-guide/annotations
* `annotations` (*type:* `map()`, *default:* `nil`) - Annotations is an unstructured key-value map stored with a resource that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the resource was created. This may be either the time creation was initiated or when it was completed.
* `deleteTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The timestamp when the resource was deleted. If the resource is not deleted, this must be empty.
* `displayName` (*type:* `String.t`, *default:* `nil`) - Mutable. The display name set by clients. Must be <= 63 characters.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ defmodule GoogleApi.ServiceControl.V2.Model.ResourceInfo do
## Attributes
* `container` (*type:* `String.t`, *default:* `nil`) - Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats: - `projects/` - `folders/` - `organizations/` For the policy enforcement on the container level (VPCSC and Location Policy check), this field takes precedence on the container extracted from name when presents.
* `location` (*type:* `String.t`, *default:* `nil`) - Optional. The location of the resource. The value must be a valid zone, region or multiregion. For example: "europe-west4" or "northamerica-northeast1-a"
* `container` (*type:* `String.t`, *default:* `nil`) - Optional. The identifier of the container of this resource. For Google Cloud APIs, the resource container must be one of the following formats: - `projects/` - `folders/` - `organizations/` Required for the policy enforcement on the container level (e.g. VPCSC, Location Policy check, Org Policy check).
* `location` (*type:* `String.t`, *default:* `nil`) - Optional. The location of the resource, it must be a valid zone, region or multiregion, for example: "europe-west4", "northamerica-northeast1-a". Required for location policy check.
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the resource referenced in the request.
* `permission` (*type:* `String.t`, *default:* `nil`) - The resource permission needed for this request. The format must be "{service}/{plural}.{verb}".
* `type` (*type:* `String.t`, *default:* `nil`) - The resource type in the format of "{service}/{kind}".
Expand Down
Original file line number Diff line number Diff line change
@@ -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.ServiceControl.V2.Model.ServiceDelegationHistory do
@moduledoc """
The history of delegation across multiple services as the result of the original user's action. Such as "service A uses its own account to do something for user B". This differs from ServiceAccountDelegationInfo, which only tracks the history of direct token exchanges (impersonation).
## Attributes
* `originalPrincipal` (*type:* `String.t`, *default:* `nil`) - The original end user who initiated the request to GCP.
* `serviceMetadata` (*type:* `list(GoogleApi.ServiceControl.V2.Model.ServiceMetadata.t)`, *default:* `nil`) - Data identifying the service specific jobs or units of work that were involved in a chain of service calls.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:originalPrincipal => String.t() | nil,
:serviceMetadata => list(GoogleApi.ServiceControl.V2.Model.ServiceMetadata.t()) | nil
}

field(:originalPrincipal)
field(:serviceMetadata, as: GoogleApi.ServiceControl.V2.Model.ServiceMetadata, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory do
def decode(value, options) do
GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.ServiceControl.V2.Model.ServiceDelegationHistory do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit c278f4a

Please sign in to comment.