Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Automated regeneration of ServiceUsage client #10775

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ defmodule GoogleApi.ServiceUsage.V1.Api.Operations do
end

@doc """
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id.
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.ServiceUsage.V1 do
API client metadata for GoogleApi.ServiceUsage.V1.
"""

@discovery_revision "20221115"
@discovery_revision "20240310"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -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.ServiceUsage.V1.Model.AddEnableRulesMetadata do
@moduledoc """
Metadata for the `AddEnableRules` method.

## Attributes

"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{}
end

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

defimpl Poison.Encoder, for: GoogleApi.ServiceUsage.V1.Model.AddEnableRulesMetadata 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,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.ServiceUsage.V1.Model.AddEnableRulesResponse do
@moduledoc """
The response message of `AddEnableRules` method.

## Attributes

* `addedValues` (*type:* `list(String.t)`, *default:* `nil`) - The values added to the parent consumer policy.
* `parent` (*type:* `String.t`, *default:* `nil`) - The parent consumer policy. It can be `projects/12345/consumerPolicies/default`, or `folders/12345/consumerPolicies/default`, or `organizations/12345/consumerPolicies/default`.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:addedValues => list(String.t()) | nil,
:parent => String.t() | nil
}

field(:addedValues, type: :list)
field(:parent)
end

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

defimpl Poison.Encoder, for: GoogleApi.ServiceUsage.V1.Model.AddEnableRulesResponse 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 @@ -22,7 +22,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.AdminQuotaPolicy do
## Attributes

* `container` (*type:* `String.t`, *default:* `nil`) - The cloud resource container at which the quota policy is created. The format is `{container_type}/{container_number}`
* `dimensions` (*type:* `map()`, *default:* `nil`) - If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, an policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.
* `dimensions` (*type:* `map()`, *default:* `nil`) - If this map is nonempty, then this policy applies only to specific values for dimensions defined in the limit unit. For example, a policy on a limit with the unit `1/{project}/{region}` could contain an entry with the key `region` and the value `us-east-1`; the policy is only applied to quota consumed in that region. This map has the following restrictions: * If `region` appears as a key, its value must be a valid Cloud region. * If `zone` appears as a key, its value must be a valid Cloud zone. * Keys other than `region` or `zone` are not valid.
* `metric` (*type:* `String.t`, *default:* `nil`) - The name of the metric to which this policy applies. An example name would be: `compute.googleapis.com/cpus`
* `name` (*type:* `String.t`, *default:* `nil`) - The resource name of the policy. This name is generated by the server when the policy is created. Example names would be: `organizations/123/services/compute.googleapis.com/consumerQuotaMetrics/compute.googleapis.com%2Fcpus/limits/%2Fproject%2Fregion/adminQuotaPolicies/4a3f2c1d`
* `policyValue` (*type:* `String.t`, *default:* `nil`) - The quota policy value. Can be any nonnegative integer, or -1 (unlimited quota).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.BackendRule do
* `jwtAudience` (*type:* `String.t`, *default:* `nil`) - The JWT audience is used when generating a JWT ID token for the backend. This ID token will be added in the HTTP "authorization" header, and sent to the backend.
* `minDeadline` (*type:* `float()`, *default:* `nil`) - Deprecated, do not use.
* `operationDeadline` (*type:* `float()`, *default:* `nil`) - The number of seconds to wait for the completion of a long running operation. The default is no deadline.
* `overridesByRequestProtocol` (*type:* `%{optional(String.t) => GoogleApi.ServiceUsage.V1.Model.BackendRule.t}`, *default:* `nil`) - The map between request protocol and the backend address.
* `pathTranslation` (*type:* `String.t`, *default:* `nil`) -
* `protocol` (*type:* `String.t`, *default:* `nil`) - The protocol used for sending a request to the backend. The supported values are "http/1.1" and "h2". The default value is inferred from the scheme in the address field: SCHEME PROTOCOL http:// http/1.1 https:// http/1.1 grpc:// h2 grpcs:// h2 For secure HTTP backends (https://) that support HTTP/2, set this field to "h2" for improved performance. Configuring this field to non-default values is only supported for secure HTTP backends. This field will be ignored for all other backends. See https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids for more details on the supported values.
* `selector` (*type:* `String.t`, *default:* `nil`) - Selects the methods to which this rule applies. Refer to selector for syntax details.
Expand All @@ -41,6 +42,8 @@ defmodule GoogleApi.ServiceUsage.V1.Model.BackendRule do
:jwtAudience => String.t() | nil,
:minDeadline => float() | nil,
:operationDeadline => float() | nil,
:overridesByRequestProtocol =>
%{optional(String.t()) => GoogleApi.ServiceUsage.V1.Model.BackendRule.t()} | nil,
:pathTranslation => String.t() | nil,
:protocol => String.t() | nil,
:selector => String.t() | nil
Expand All @@ -52,6 +55,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.BackendRule do
field(:jwtAudience)
field(:minDeadline)
field(:operationDeadline)
field(:overridesByRequestProtocol, as: GoogleApi.ServiceUsage.V1.Model.BackendRule, type: :map)
field(:pathTranslation)
field(:protocol)
field(:selector)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.ClientLibrarySettings do
* `pythonSettings` (*type:* `GoogleApi.ServiceUsage.V1.Model.PythonSettings.t`, *default:* `nil`) - Settings for Python client libraries.
* `restNumericEnums` (*type:* `boolean()`, *default:* `nil`) - When using transport=rest, the client request will encode enums as numbers rather than strings.
* `rubySettings` (*type:* `GoogleApi.ServiceUsage.V1.Model.RubySettings.t`, *default:* `nil`) - Settings for Ruby client libraries.
* `version` (*type:* `String.t`, *default:* `nil`) - Version of the API to apply these settings to.
* `version` (*type:* `String.t`, *default:* `nil`) - Version of the API to apply these settings to. This is the full protobuf package for the API, ending in the version element. Examples: "google.cloud.speech.v1" and "google.spanner.admin.database.v1".
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
@@ -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.ServiceUsage.V1.Model.ConsumerPolicy do
@moduledoc """
Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.

## Attributes

* `annotations` (*type:* `map()`, *default:* `nil`) - Optional. Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects. [AIP-128](https://google.aip.dev/128#annotations)
* `enableRules` (*type:* `list(GoogleApi.ServiceUsage.V1.Model.EnableRule.t)`, *default:* `nil`) - Enable rules define usable services and service groups.
* `etag` (*type:* `String.t`, *default:* `nil`) - An opaque tag indicating the current version of the policy, used for concurrency control.
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the policy. We only allow consumer policy name as `default` for now: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`.
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The last-modified time.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:annotations => map() | nil,
:enableRules => list(GoogleApi.ServiceUsage.V1.Model.EnableRule.t()) | nil,
:etag => String.t() | nil,
:name => String.t() | nil,
:updateTime => DateTime.t() | nil
}

field(:annotations, type: :map)
field(:enableRules, as: GoogleApi.ServiceUsage.V1.Model.EnableRule, type: :list)
field(:etag)
field(:name)
field(:updateTime, as: DateTime)
end

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

defimpl Poison.Encoder, for: GoogleApi.ServiceUsage.V1.Model.ConsumerPolicy 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 @@ -22,15 +22,18 @@ defmodule GoogleApi.ServiceUsage.V1.Model.Control do
## Attributes

* `environment` (*type:* `String.t`, *default:* `nil`) - The service controller environment to use. If empty, no control plane feature (like quota and billing) will be enabled. The recommended value for most services is servicecontrol.googleapis.com
* `methodPolicies` (*type:* `list(GoogleApi.ServiceUsage.V1.Model.MethodPolicy.t)`, *default:* `nil`) - Defines policies applying to the API methods of the service.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:environment => String.t() | nil
:environment => String.t() | nil,
:methodPolicies => list(GoogleApi.ServiceUsage.V1.Model.MethodPolicy.t()) | nil
}

field(:environment)
field(:methodPolicies, as: GoogleApi.ServiceUsage.V1.Model.MethodPolicy, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.ServiceUsage.V1.Model.Control do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@

defmodule GoogleApi.ServiceUsage.V1.Model.Documentation do
@moduledoc """
`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages; - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.
`Documentation` provides the information for describing a service. Example: documentation: summary: > The Google Calendar API gives access to most calendar features. pages: - name: Overview content: (== include google/foo/overview.md ==) - name: Tutorial content: (== include google/foo/tutorial.md ==) subpages: - name: Java content: (== include google/foo/tutorial_java.md ==) rules: - selector: google.calendar.Calendar.Get description: > ... - selector: google.calendar.Calendar.Put description: > ... Documentation is provided in markdown syntax. In addition to standard markdown features, definition lists, tables and fenced code blocks are supported. Section headers can be provided and are interpreted relative to the section nesting of the context where a documentation fragment is embedded. Documentation from the IDL is merged with documentation defined via the config at normalization time, where documentation provided by config rules overrides IDL provided. A number of constructs specific to the API platform are supported in documentation text. In order to reference a proto element, the following notation can be used: [fully.qualified.proto.name][] To override the display text used for the link, this can be used: [display text][fully.qualified.proto.name] Text can be excluded from doc using the following notation: (-- internal comment --) A few directives are available in documentation. Note that directives must appear on a single line to be properly identified. The `include` directive includes a markdown file from an external source: (== include path/to/file ==) The `resource_for` directive marks a message to be the resource of a collection in REST view. If it is not specified, tools attempt to infer the resource from the operations in a collection: (== resource_for v1.shelves.books ==) The directive `suppress_warning` does not directly affect documentation and is documented together with service config validation.

## Attributes

* `documentationRootUrl` (*type:* `String.t`, *default:* `nil`) - The URL to the root of documentation.
* `overview` (*type:* `String.t`, *default:* `nil`) - Declares a single overview page. For example: documentation: summary: ... overview: (== include overview.md ==) This is a shortcut for the following declaration (using pages style): documentation: summary: ... pages: - name: Overview content: (== include overview.md ==) Note: you cannot specify both `overview` field and `pages` field.
* `pages` (*type:* `list(GoogleApi.ServiceUsage.V1.Model.Page.t)`, *default:* `nil`) - The top level pages for the documentation set.
* `rules` (*type:* `list(GoogleApi.ServiceUsage.V1.Model.DocumentationRule.t)`, *default:* `nil`) - A list of documentation rules that apply to individual API elements. **NOTE:** All service configuration rules follow "last one wins" order.
* `sectionOverrides` (*type:* `list(GoogleApi.ServiceUsage.V1.Model.Page.t)`, *default:* `nil`) - Specifies section and content to override boilerplate content provided by go/api-docgen. Currently overrides following sections: 1. rest.service.client_libraries
* `serviceRootUrl` (*type:* `String.t`, *default:* `nil`) - Specifies the service root url if the default one (the service name from the yaml file) is not suitable. This can be seen in any fully specified service urls as well as sections that show a base that other urls are relative to.
* `summary` (*type:* `String.t`, *default:* `nil`) - A short description of what the service does. The summary must be plain text. It becomes the overview of the service displayed in Google Cloud Console. NOTE: This field is equivalent to the standard field `description`.
"""
Expand All @@ -36,6 +37,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.Documentation do
:overview => String.t() | nil,
:pages => list(GoogleApi.ServiceUsage.V1.Model.Page.t()) | nil,
:rules => list(GoogleApi.ServiceUsage.V1.Model.DocumentationRule.t()) | nil,
:sectionOverrides => list(GoogleApi.ServiceUsage.V1.Model.Page.t()) | nil,
:serviceRootUrl => String.t() | nil,
:summary => String.t() | nil
}
Expand All @@ -44,6 +46,7 @@ defmodule GoogleApi.ServiceUsage.V1.Model.Documentation do
field(:overview)
field(:pages, as: GoogleApi.ServiceUsage.V1.Model.Page, type: :list)
field(:rules, as: GoogleApi.ServiceUsage.V1.Model.DocumentationRule, type: :list)
field(:sectionOverrides, as: GoogleApi.ServiceUsage.V1.Model.Page, type: :list)
field(:serviceRootUrl)
field(:summary)
end
Expand Down
Loading
Loading