From 027b6ff5456b8882dc9369d5c011f780bb550942 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 12 Mar 2024 02:55:07 +0000 Subject: [PATCH] feat: Automated regeneration of ApigeeRegistry client --- clients/apigee_registry/README.md | 2 +- .../apigee_registry/v1/api/projects.ex | 228 +++++++++++++++++- .../google_api/apigee_registry/v1/metadata.ex | 2 +- .../v1/model/api_deployment.ex | 2 +- .../apigee_registry/v1/model/api_spec.ex | 2 +- .../apigee_registry/v1/model/api_version.ex | 3 + .../apigee_registry/v1/model/artifact.ex | 6 + .../apigee_registry/v1/model/binding.ex | 2 +- .../apigee_registry/v1/model/build.ex | 52 ++++ .../apigee_registry/v1/model/instance.ex | 3 + .../apigee_registry/v1/model/location.ex | 2 +- .../apigee_registry/v1/model/operation.ex | 2 +- .../apigee_registry/v1/model/policy.ex | 2 +- clients/apigee_registry/mix.exs | 2 +- 14 files changed, 298 insertions(+), 12 deletions(-) create mode 100644 clients/apigee_registry/lib/google_api/apigee_registry/v1/model/build.ex diff --git a/clients/apigee_registry/README.md b/clients/apigee_registry/README.md index a303b225bf..2f65b6b9f6 100644 --- a/clients/apigee_registry/README.md +++ b/clients/apigee_registry/README.md @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding ```elixir def deps do - [{:google_api_apigee_registry, "~> 0.3"}] + [{:google_api_apigee_registry, "~> 0.4"}] end ``` diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/api/projects.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/api/projects.ex index 67fe294171..6a1cef42a4 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/api/projects.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/api/projects.ex @@ -1862,6 +1862,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields. * `:pageSize` (*type:* `integer()`) - The maximum number of revisions to return per page. * `:pageToken` (*type:* `String.t`) - The page token, received from a previous ListApiDeploymentRevisions call. Provide this to retrieve the subsequent page. * `opts` (*type:* `keyword()`) - Call options @@ -1899,6 +1900,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :filter => :query, :pageSize => :query, :pageToken => :query } @@ -2145,7 +2147,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.ApigeeRegistry.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the deployment to be tagged, including the revision ID. + * `name` (*type:* `String.t`) - Required. The name of the deployment to be tagged, including the revision ID is optional. If a revision is not specified, it will tag the latest revision. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -4492,6 +4494,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do * `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters. * `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart"). * `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart"). + * `:filter` (*type:* `String.t`) - An expression that can be used to filter the list. Filters use the Common Expression Language and can refer to all message fields. * `:pageSize` (*type:* `integer()`) - The maximum number of revisions to return per page. * `:pageToken` (*type:* `String.t`) - The page token, received from a previous ListApiSpecRevisions call. Provide this to retrieve the subsequent page. * `opts` (*type:* `keyword()`) - Call options @@ -4529,6 +4532,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do :quotaUser => :query, :uploadType => :query, :upload_protocol => :query, + :filter => :query, :pageSize => :query, :pageToken => :query } @@ -4775,7 +4779,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do ## Parameters * `connection` (*type:* `GoogleApi.ApigeeRegistry.V1.Connection.t`) - Connection to server - * `name` (*type:* `String.t`) - Required. The name of the spec to be tagged, including the revision ID. + * `name` (*type:* `String.t`) - Required. The name of the spec to be tagged, including the revision ID is optional. If a revision is not specified, it will tag the latest revision. * `optional_params` (*type:* `keyword()`) - Optional parameters * `:"$.xgafv"` (*type:* `String.t`) - V1 error format. * `:access_token` (*type:* `String.t`) - OAuth access token. @@ -6223,6 +6227,224 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do ) end + @doc """ + Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ApigeeRegistry.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - 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. + * `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"). + * `:"options.requestedPolicyVersion"` (*type:* `integer()`) - 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). + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ApigeeRegistry.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec apigeeregistry_projects_locations_documents_get_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ApigeeRegistry.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def apigeeregistry_projects_locations_documents_get_iam_policy( + connection, + resource, + 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, + :"options.requestedPolicyVersion" => :query + } + + request = + Request.new() + |> Request.method(:get) + |> Request.url("/v1/{+resource}:getIamPolicy", %{ + "resource" => URI.encode(resource, &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.ApigeeRegistry.V1.Model.Policy{}]) + end + + @doc """ + Sets the access control policy on the specified resource. Replaces any existing policy. Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ApigeeRegistry.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - 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. + * `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.ApigeeRegistry.V1.Model.SetIamPolicyRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ApigeeRegistry.V1.Model.Policy{}}` on success + * `{:error, info}` on failure + """ + @spec apigeeregistry_projects_locations_documents_set_iam_policy( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ApigeeRegistry.V1.Model.Policy.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def apigeeregistry_projects_locations_documents_set_iam_policy( + connection, + resource, + 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/{+resource}:setIamPolicy", %{ + "resource" => URI.encode(resource, &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.ApigeeRegistry.V1.Model.Policy{}]) + end + + @doc """ + Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning. + + ## Parameters + + * `connection` (*type:* `GoogleApi.ApigeeRegistry.V1.Connection.t`) - Connection to server + * `resource` (*type:* `String.t`) - 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. + * `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.ApigeeRegistry.V1.Model.TestIamPermissionsRequest.t`) - + * `opts` (*type:* `keyword()`) - Call options + + ## Returns + + * `{:ok, %GoogleApi.ApigeeRegistry.V1.Model.TestIamPermissionsResponse{}}` on success + * `{:error, info}` on failure + """ + @spec apigeeregistry_projects_locations_documents_test_iam_permissions( + Tesla.Env.client(), + String.t(), + keyword(), + keyword() + ) :: + {:ok, GoogleApi.ApigeeRegistry.V1.Model.TestIamPermissionsResponse.t()} + | {:ok, Tesla.Env.t()} + | {:ok, list()} + | {:error, any()} + def apigeeregistry_projects_locations_documents_test_iam_permissions( + connection, + resource, + 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/{+resource}:testIamPermissions", %{ + "resource" => URI.encode(resource, &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.ApigeeRegistry.V1.Model.TestIamPermissionsResponse{}] + ) + end + @doc """ Provisions instance resources for the Registry. @@ -6868,7 +7090,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Api.Projects do end @doc """ - Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. NOTE: the `name` binding allows API services to override the binding to use different resource name schemes, such as `users/*/operations`. To override the binding, API services can add a binding such as `"/v1/{name=users/*}/operations"` to their service configuration. For backwards compatibility, the default name includes the operations collection id, however overriding users must ensure the name binding is the parent resource, without the operations collection id. + Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. ## Parameters diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/metadata.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/metadata.ex index f603d7f728..a946aa925c 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/metadata.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/metadata.ex @@ -20,7 +20,7 @@ defmodule GoogleApi.ApigeeRegistry.V1 do API client metadata for GoogleApi.ApigeeRegistry.V1. """ - @discovery_revision "20220929" + @discovery_revision "20231204" def discovery_revision(), do: @discovery_revision end diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_deployment.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_deployment.ex index 50eb6b4d4f..5810459c19 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_deployment.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_deployment.ex @@ -23,7 +23,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.ApiDeployment do * `accessGuidance` (*type:* `String.t`, *default:* `nil`) - Text briefly describing how to access the endpoint. Changes to this value will not affect the revision. * `annotations` (*type:* `map()`, *default:* `nil`) - Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts. - * `apiSpecRevision` (*type:* `String.t`, *default:* `nil`) - The full resource name (including revision ID) of the spec of the API being served by the deployment. Changes to this value will update the revision. Format: `apis/{api}/deployments/{deployment}` + * `apiSpecRevision` (*type:* `String.t`, *default:* `nil`) - The full resource name (including revision ID) of the spec of the API being served by the deployment. Changes to this value will update the revision. Format: `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec@revision}` * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation timestamp; when the deployment resource was created. * `description` (*type:* `String.t`, *default:* `nil`) - A detailed description. * `displayName` (*type:* `String.t`, *default:* `nil`) - Human-meaningful name. diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_spec.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_spec.ex index 1cd93adc81..cb46843c71 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_spec.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_spec.ex @@ -28,7 +28,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.ApiSpec do * `filename` (*type:* `String.t`, *default:* `nil`) - A possibly-hierarchical name used to refer to the spec from other specs. * `hash` (*type:* `String.t`, *default:* `nil`) - Output only. A SHA-256 hash of the spec's contents. If the spec is gzipped, this is the hash of the uncompressed spec. * `labels` (*type:* `map()`, *default:* `nil`) - Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with `apigeeregistry.googleapis.com/` and cannot be changed. - * `mimeType` (*type:* `String.t`, *default:* `nil`) - A style (format) descriptor for this spec that is specified as a Media Type (https://en.wikipedia.org/wiki/Media_type). Possible values include `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and `application/vnd.apigee.graphql`, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip"). + * `mimeType` (*type:* `String.t`, *default:* `nil`) - A style (format) descriptor for this spec that is specified as a [Media Type](https://en.wikipedia.org/wiki/Media_type). Possible values include `application/vnd.apigee.proto`, `application/vnd.apigee.openapi`, and `application/vnd.apigee.graphql`, with possible suffixes representing compression types. These hypothetical names are defined in the vendor tree defined in RFC6838 (https://tools.ietf.org/html/rfc6838) and are not final. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip"). * `name` (*type:* `String.t`, *default:* `nil`) - Resource name. * `revisionCreateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Revision creation timestamp; when the represented revision was created. * `revisionId` (*type:* `String.t`, *default:* `nil`) - Output only. Immutable. The revision ID of the spec. A new revision is committed whenever the spec contents are changed. The format is an 8-character hexadecimal string. diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_version.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_version.ex index dae90f8d41..3ebc53fa9c 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_version.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/api_version.ex @@ -27,6 +27,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.ApiVersion do * `displayName` (*type:* `String.t`, *default:* `nil`) - Human-meaningful name. * `labels` (*type:* `map()`, *default:* `nil`) - Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with `apigeeregistry.googleapis.com/` and cannot be changed. * `name` (*type:* `String.t`, *default:* `nil`) - Resource name. + * `primarySpec` (*type:* `String.t`, *default:* `nil`) - The primary spec for this version. Format: projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec} * `state` (*type:* `String.t`, *default:* `nil`) - A user-definable description of the lifecycle phase of this API version. Format: free-form, but we expect single words that describe API maturity, e.g., "CONCEPT", "DESIGN", "DEVELOPMENT", "STAGING", "PRODUCTION", "DEPRECATED", "RETIRED". * `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Last update timestamp. """ @@ -40,6 +41,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.ApiVersion do :displayName => String.t() | nil, :labels => map() | nil, :name => String.t() | nil, + :primarySpec => String.t() | nil, :state => String.t() | nil, :updateTime => DateTime.t() | nil } @@ -50,6 +52,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.ApiVersion do field(:displayName) field(:labels, type: :map) field(:name) + field(:primarySpec) field(:state) field(:updateTime, as: DateTime) end diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/artifact.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/artifact.ex index b6eb91424b..69df07f49c 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/artifact.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/artifact.ex @@ -21,9 +21,11 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Artifact do ## Attributes + * `annotations` (*type:* `map()`, *default:* `nil`) - Annotations attach non-identifying metadata to resources. Annotation keys and values are less restricted than those of labels, but should be generally used for small values of broad interest. Larger, topic- specific metadata should be stored in Artifacts. * `contents` (*type:* `String.t`, *default:* `nil`) - Input only. The contents of the artifact. Provided by API callers when artifacts are created or replaced. To access the contents of an artifact, use GetArtifactContents. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation timestamp. * `hash` (*type:* `String.t`, *default:* `nil`) - Output only. A SHA-256 hash of the artifact's contents. If the artifact is gzipped, this is the hash of the uncompressed artifact. + * `labels` (*type:* `map()`, *default:* `nil`) - Labels attach identifying metadata to resources. Identifying metadata can be used to filter list operations. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. No more than 64 user labels can be associated with one resource (System labels are excluded). See https://goo.gl/xmQnxf for more information and examples of labels. System reserved label keys are prefixed with "registry.googleapis.com/" and cannot be changed. * `mimeType` (*type:* `String.t`, *default:* `nil`) - A content type specifier for the artifact. Content type specifiers are Media Types (https://en.wikipedia.org/wiki/Media_type) with a possible "schema" parameter that specifies a schema for the stored information. Content types can specify compression. Currently only GZip compression is supported (indicated with "+gzip"). * `name` (*type:* `String.t`, *default:* `nil`) - Resource name. * `sizeBytes` (*type:* `integer()`, *default:* `nil`) - Output only. The size of the artifact in bytes. If the artifact is gzipped, this is the size of the uncompressed artifact. @@ -33,18 +35,22 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Artifact do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :annotations => map() | nil, :contents => String.t() | nil, :createTime => DateTime.t() | nil, :hash => String.t() | nil, + :labels => map() | nil, :mimeType => String.t() | nil, :name => String.t() | nil, :sizeBytes => integer() | nil, :updateTime => DateTime.t() | nil } + field(:annotations, type: :map) field(:contents) field(:createTime, as: DateTime) field(:hash) + field(:labels, type: :map) field(:mimeType) field(:name) field(:sizeBytes) diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/binding.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/binding.ex index c8a3a9c481..905862dab8 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/binding.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/binding.ex @@ -22,7 +22,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Binding do ## Attributes * `condition` (*type:* `GoogleApi.ApigeeRegistry.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`. + * `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`. * `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. * `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`. """ diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/build.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/build.ex new file mode 100644 index 0000000000..85c3a7b244 --- /dev/null +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/build.ex @@ -0,0 +1,52 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# NOTE: This file is auto generated by the elixir code generator program. +# Do not edit this file manually. + +defmodule GoogleApi.ApigeeRegistry.V1.Model.Build do + @moduledoc """ + Build information of the Instance if it's in `ACTIVE` state. + + ## Attributes + + * `commitId` (*type:* `String.t`, *default:* `nil`) - Output only. Commit ID of the latest commit in the build. + * `commitTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Commit time of the latest commit in the build. + * `repo` (*type:* `String.t`, *default:* `nil`) - Output only. Path of the open source repository: github.com/apigee/registry. + """ + + use GoogleApi.Gax.ModelBase + + @type t :: %__MODULE__{ + :commitId => String.t() | nil, + :commitTime => DateTime.t() | nil, + :repo => String.t() | nil + } + + field(:commitId) + field(:commitTime, as: DateTime) + field(:repo) +end + +defimpl Poison.Decoder, for: GoogleApi.ApigeeRegistry.V1.Model.Build do + def decode(value, options) do + GoogleApi.ApigeeRegistry.V1.Model.Build.decode(value, options) + end +end + +defimpl Poison.Encoder, for: GoogleApi.ApigeeRegistry.V1.Model.Build do + def encode(value, options) do + GoogleApi.Gax.ModelBase.encode(value, options) + end +end diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/instance.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/instance.ex index 8443c09bbe..b155b0c990 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/instance.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/instance.ex @@ -21,6 +21,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Instance do ## Attributes + * `build` (*type:* `GoogleApi.ApigeeRegistry.V1.Model.Build.t`, *default:* `nil`) - Output only. Build info of the Instance if it's in `ACTIVE` state. * `config` (*type:* `GoogleApi.ApigeeRegistry.V1.Model.Config.t`, *default:* `nil`) - Required. Config of the Instance. * `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation timestamp. * `name` (*type:* `String.t`, *default:* `nil`) - Format: `projects/*/locations/*/instance`. Currently only `locations/global` is supported. @@ -32,6 +33,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Instance do use GoogleApi.Gax.ModelBase @type t :: %__MODULE__{ + :build => GoogleApi.ApigeeRegistry.V1.Model.Build.t() | nil, :config => GoogleApi.ApigeeRegistry.V1.Model.Config.t() | nil, :createTime => DateTime.t() | nil, :name => String.t() | nil, @@ -40,6 +42,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Instance do :updateTime => DateTime.t() | nil } + field(:build, as: GoogleApi.ApigeeRegistry.V1.Model.Build) field(:config, as: GoogleApi.ApigeeRegistry.V1.Model.Config) field(:createTime, as: DateTime) field(:name) diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/location.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/location.ex index 527962b10f..5234d11a25 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/location.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/location.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Location do @moduledoc """ - A resource that represents Google Cloud Platform location. + A resource that represents a Google Cloud location. ## Attributes diff --git a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/operation.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/operation.ex index 1d0166d23f..e4182a8694 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/operation.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/operation.ex @@ -25,7 +25,7 @@ defmodule GoogleApi.ApigeeRegistry.V1.Model.Operation do * `error` (*type:* `GoogleApi.ApigeeRegistry.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/apigee_registry/lib/google_api/apigee_registry/v1/model/policy.ex b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/policy.ex index 23c06abcf7..71da70cb63 100644 --- a/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/policy.ex +++ b/clients/apigee_registry/lib/google_api/apigee_registry/v1/model/policy.ex @@ -17,7 +17,7 @@ defmodule GoogleApi.ApigeeRegistry.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/apigee_registry/mix.exs b/clients/apigee_registry/mix.exs index 113135e514..103eb8283b 100644 --- a/clients/apigee_registry/mix.exs +++ b/clients/apigee_registry/mix.exs @@ -18,7 +18,7 @@ defmodule GoogleApi.ApigeeRegistry.Mixfile do use Mix.Project - @version "0.3.1" + @version "0.4.0" def project() do [