# frozen_string_literal: true # Copyright 2024 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 # # https://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. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module ApiHub module V1 # An API resource in the API Hub. # @!attribute [rw] name # @return [::String] # Identifier. The name of the API resource in the API Hub. # # Format: # `projects/{project}/locations/{location}/apis/{api}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the API resource. # @!attribute [rw] description # @return [::String] # Optional. The description of the API resource. # @!attribute [rw] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Optional. The documentation for the API resource. # @!attribute [rw] owner # @return [::Google::Cloud::ApiHub::V1::Owner] # Optional. Owner details for the API resource. # @!attribute [r] versions # @return [::Array<::String>] # Output only. The list of versions present in an API resource. # Note: An API resource can be associated with more than 1 version. # Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the API resource was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the API resource was last updated. # @!attribute [rw] target_user # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The target users for the API. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-target-user` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] team # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The team owning the API. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-team` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] business_unit # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The business unit owning the API. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-business-unit` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] maturity_level # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The maturity level of the API. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-maturity-level` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the API # resource. The key is the attribute name. It will be of the format: # `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. # @!attribute [rw] api_style # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The style of the API. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-api-style` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] selected_version # @return [::String] # Optional. The selected version for an API resource. # This can be used when special handling is needed on client side for # particular version of the API. Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` class Api include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Represents a version of the API resource in API hub. This is also referred # to as the API version. # @!attribute [rw] name # @return [::String] # Identifier. The name of the version. # # Format: # `projects/{project}/locations/{location}/apis/{api}/versions/{version}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the version. # @!attribute [rw] description # @return [::String] # Optional. The description of the version. # @!attribute [rw] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Optional. The documentation of the version. # @!attribute [r] specs # @return [::Array<::String>] # Output only. The specs associated with this version. # Note that an API version can be associated with multiple specs. # Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` # @!attribute [r] api_operations # @return [::Array<::String>] # Output only. The operations contained in the API version. # These operations will be added to the version when a new spec is # added or when an existing spec is updated. Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` # @!attribute [r] definitions # @return [::Array<::String>] # Output only. The definitions contained in the API version. # These definitions will be added to the version when a new spec is # added or when an existing spec is updated. Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` # @!attribute [rw] deployments # @return [::Array<::String>] # Optional. The deployments linked to this API version. # Note: A particular API version could be deployed to multiple deployments # (for dev deployment, UAT deployment, etc) # Format is # `projects/{project}/locations/{location}/deployments/{deployment}` # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the version was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the version was last updated. # @!attribute [rw] lifecycle # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The lifecycle of the API version. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-lifecycle` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] compliance # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The compliance associated with the API version. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-compliance` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] accreditation # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The accreditations associated with the API version. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-accreditation` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the Version # resource. The key is the attribute name. It will be of the format: # `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. # @!attribute [rw] selected_deployment # @return [::String] # Optional. The selected deployment for a Version resource. # This can be used when special handling is needed on client side for a # particular deployment linked to the version. # Format is # `projects/{project}/locations/{location}/deployments/{deployment}` class Version include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Represents a spec associated with an API version in the API # Hub. Note that specs of various types can be uploaded, however # parsing of details is supported for OpenAPI spec currently. # @!attribute [rw] name # @return [::String] # Identifier. The name of the spec. # # Format: # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the spec. # This can contain the file name of the spec. # @!attribute [rw] spec_type # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Required. The type of spec. # The value should be one of the allowed values defined for # `projects/{project}/locations/{location}/attributes/system-spec-type` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. # # Note, this field is mandatory if content is provided. # @!attribute [rw] contents # @return [::Google::Cloud::ApiHub::V1::SpecContents] # Optional. Input only. The contents of the uploaded spec. # @!attribute [r] details # @return [::Google::Cloud::ApiHub::V1::SpecDetails] # Output only. Details parsed from the spec. # @!attribute [rw] source_uri # @return [::String] # Optional. The URI of the spec source in case file is uploaded # from an external version control system. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the spec was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the spec was last updated. # @!attribute [rw] lint_response # @return [::Google::Cloud::ApiHub::V1::LintResponse] # Optional. The lint response for the spec. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the spec. # The key is the attribute name. It will be of the format: # `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. # @!attribute [rw] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Optional. The documentation of the spec. # For OpenAPI spec, this will be populated from `externalDocs` in OpenAPI # spec. # @!attribute [rw] parsing_mode # @return [::Google::Cloud::ApiHub::V1::Spec::ParsingMode] # Optional. Input only. Enum specifying the parsing mode for OpenAPI # Specification (OAS) parsing. class Spec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Specifies the parsing mode for API specifications during creation and # update. # - `RELAXED`: Parsing errors in the specification content do not fail the # API call. # - `STRICT`: Parsing errors in the specification content result in failure # of the API call. # If not specified, defaults to `RELAXED`. module ParsingMode # Defaults to `RELAXED`. PARSING_MODE_UNSPECIFIED = 0 # Parsing of the Spec on create and update is relaxed, meaning that # parsing errors the spec contents will not fail the API call. RELAXED = 1 # Parsing of the Spec on create and update is strict, meaning that # parsing errors in the spec contents will fail the API call. STRICT = 2 end end # Details of the deployment where APIs are hosted. # A deployment could represent an Apigee proxy, API gateway, other Google Cloud # services or non-Google Cloud services as well. A deployment entity is a root # level entity in the API hub and exists independent of any API. # @!attribute [rw] name # @return [::String] # Identifier. The name of the deployment. # # Format: # `projects/{project}/locations/{location}/deployments/{deployment}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the deployment. # @!attribute [rw] description # @return [::String] # Optional. The description of the deployment. # @!attribute [rw] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Optional. The documentation of the deployment. # @!attribute [rw] deployment_type # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Required. The type of deployment. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-deployment-type` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] resource_uri # @return [::String] # Required. A URI to the runtime resource. This URI can be used to manage the # resource. For example, if the runtime resource is of type APIGEE_PROXY, # then this field will contain the URI to the management UI of the proxy. # @!attribute [rw] endpoints # @return [::Array<::String>] # Required. The endpoints at which this deployment resource is listening for # API requests. This could be a list of complete URIs, hostnames or an IP # addresses. # @!attribute [r] api_versions # @return [::Array<::String>] # Output only. The API versions linked to this deployment. # Note: A particular deployment could be linked to multiple different API # versions (of same or different APIs). # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the deployment was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the deployment was last updated. # @!attribute [rw] slo # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The SLO for this deployment. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-slo` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] environment # @return [::Google::Cloud::ApiHub::V1::AttributeValues] # Optional. The environment mapping to this deployment. # This maps to the following system defined attribute: # `projects/{project}/locations/{location}/attributes/system-environment` # attribute. # The number of values for this attribute will be based on the # cardinality of the attribute. The same can be retrieved via GetAttribute # API. All values should be from the list of allowed values defined for the # attribute. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the # deployment resource. The key is the attribute name. It will be of the # format: `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. class Deployment include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Represents an operation contained in an API version in the API Hub. # An operation is added/updated/deleted in an API version when a new spec is # added or an existing spec is updated/deleted in a version. # Currently, an operation will be created only corresponding to OpenAPI spec as # parsing is supported for OpenAPI spec. # @!attribute [rw] name # @return [::String] # Identifier. The name of the operation. # # Format: # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` # @!attribute [r] spec # @return [::String] # Output only. The name of the spec from where the operation was parsed. # Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` # @!attribute [r] details # @return [::Google::Cloud::ApiHub::V1::OperationDetails] # Output only. Operation details. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the operation was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the operation was last updated. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the API # operation resource. The key is the attribute name. It will be of the # format: `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. class ApiOperation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Represents a definition for example schema, request, response definitions # contained in an API version. # A definition is added/updated/deleted in an API version when a new spec is # added or an existing spec is updated/deleted in a version. Currently, # definition will be created only corresponding to OpenAPI spec as parsing is # supported for OpenAPI spec. Also, within OpenAPI spec, only `schema` object # is supported. # @!attribute [r] schema # @return [::Google::Cloud::ApiHub::V1::Schema] # Output only. The value of a schema definition. # @!attribute [rw] name # @return [::String] # Identifier. The name of the definition. # # Format: # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/definitions/{definition}` # @!attribute [r] spec # @return [::String] # Output only. The name of the spec from where the definition was parsed. # Format is # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/specs/{spec}` # @!attribute [r] type # @return [::Google::Cloud::ApiHub::V1::Definition::Type] # Output only. The type of the definition. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the definition was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the definition was last updated. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the # definition resource. The key is the attribute name. It will be of the # format: `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. class Definition include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Enumeration of definition types. module Type # Definition type unspecified. TYPE_UNSPECIFIED = 0 # Definition type schema. SCHEMA = 1 end end # An attribute in the API Hub. # An attribute is a name value pair which can be attached to different # resources in the API hub based on the scope of the attribute. Attributes can # either be pre-defined by the API Hub or created by users. # @!attribute [rw] name # @return [::String] # Identifier. The name of the attribute in the API Hub. # # Format: # `projects/{project}/locations/{location}/attributes/{attribute}` # @!attribute [rw] display_name # @return [::String] # Required. The display name of the attribute. # @!attribute [rw] description # @return [::String] # Optional. The description of the attribute. # @!attribute [r] definition_type # @return [::Google::Cloud::ApiHub::V1::Attribute::DefinitionType] # Output only. The definition type of the attribute. # @!attribute [rw] scope # @return [::Google::Cloud::ApiHub::V1::Attribute::Scope] # Required. The scope of the attribute. It represents the resource in the API # Hub to which the attribute can be linked. # @!attribute [rw] data_type # @return [::Google::Cloud::ApiHub::V1::Attribute::DataType] # Required. The type of the data of the attribute. # @!attribute [rw] allowed_values # @return [::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>] # Optional. The list of allowed values when the attribute value is of type # enum. This is required when the data_type of the attribute is ENUM. The # maximum number of allowed values of an attribute will be 1000. # @!attribute [rw] cardinality # @return [::Integer] # Optional. The maximum number of values that the attribute can have when # associated with an API Hub resource. Cardinality 1 would represent a # single-valued attribute. It must not be less than 1 or greater than 20. If # not specified, the cardinality would be set to 1 by default and represent a # single-valued attribute. # @!attribute [r] mandatory # @return [::Boolean] # Output only. When mandatory is true, the attribute is mandatory for the # resource specified in the scope. Only System defined attributes can be # mandatory. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the attribute was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the attribute was last updated. class Attribute include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The value that can be assigned to the attribute when the data type is # enum. # @!attribute [rw] id # @return [::String] # Required. The ID of the allowed value. # * If provided, the same will be used. The service will throw an error if # the specified id is already used by another allowed value in the same # attribute resource. # * If not provided, a system generated id derived from the display name # will be used. In this case, the service will handle conflict resolution # by adding a system generated suffix in case of duplicates. # # This value should be 4-63 characters, and valid characters # are /[a-z][0-9]-/. # @!attribute [rw] display_name # @return [::String] # Required. The display name of the allowed value. # @!attribute [rw] description # @return [::String] # Optional. The detailed description of the allowed value. # @!attribute [rw] immutable # @return [::Boolean] # Optional. When set to true, the allowed value cannot be updated or # deleted by the user. It can only be true for System defined attributes. class AllowedValue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Enumeration of attribute definition types. module DefinitionType # Attribute definition type unspecified. DEFINITION_TYPE_UNSPECIFIED = 0 # The attribute is predefined by the API Hub. Note that only the list of # allowed values can be updated in this case via UpdateAttribute method. SYSTEM_DEFINED = 1 # The attribute is defined by the user. USER_DEFINED = 2 end # Enumeration for the scope of the attribute representing the resource in the # API Hub to which the attribute can be linked. module Scope # Scope Unspecified. SCOPE_UNSPECIFIED = 0 # Attribute can be linked to an API. API = 1 # Attribute can be linked to an API version. VERSION = 2 # Attribute can be linked to a Spec. SPEC = 3 # Attribute can be linked to an API Operation. API_OPERATION = 4 # Attribute can be linked to a Deployment. DEPLOYMENT = 5 # Attribute can be linked to a Dependency. DEPENDENCY = 6 # Attribute can be linked to a definition. DEFINITION = 7 # Attribute can be linked to a ExternalAPI. EXTERNAL_API = 8 # Attribute can be linked to a Plugin. PLUGIN = 9 end # Enumeration of attribute's data type. module DataType # Attribute data type unspecified. DATA_TYPE_UNSPECIFIED = 0 # Attribute's value is of type enum. ENUM = 1 # Attribute's value is of type json. JSON = 2 # Attribute's value is of type string. STRING = 3 end end # The spec contents. # @!attribute [rw] contents # @return [::String] # Required. The contents of the spec. # @!attribute [rw] mime_type # @return [::String] # Required. The mime type of the content for example application/json, # application/yaml, application/wsdl etc. class SpecContents include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # SpecDetails contains the details parsed from supported # spec types. # @!attribute [r] open_api_spec_details # @return [::Google::Cloud::ApiHub::V1::OpenApiSpecDetails] # Output only. Additional details apart from `OperationDetails` parsed from # an OpenAPI spec. The OperationDetails parsed from the spec can be # obtained by using # {::Google::Cloud::ApiHub::V1::ApiHub::Rest::Client#list_api_operations ListAPIOperations} # method. # @!attribute [r] description # @return [::String] # Output only. The description of the spec. class SpecDetails include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # OpenApiSpecDetails contains the details parsed from an OpenAPI spec in # addition to the fields mentioned in # {::Google::Cloud::ApiHub::V1::SpecDetails SpecDetails}. # @!attribute [r] format # @return [::Google::Cloud::ApiHub::V1::OpenApiSpecDetails::Format] # Output only. The format of the spec. # @!attribute [r] version # @return [::String] # Output only. The version in the spec. # This maps to `info.version` in OpenAPI spec. # @!attribute [r] owner # @return [::Google::Cloud::ApiHub::V1::Owner] # Output only. Owner details for the spec. # This maps to `info.contact` in OpenAPI spec. class OpenApiSpecDetails include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enumeration of spec formats. module Format # SpecFile type unspecified. FORMAT_UNSPECIFIED = 0 # OpenAPI Spec v2.0. OPEN_API_SPEC_2_0 = 1 # OpenAPI Spec v3.0. OPEN_API_SPEC_3_0 = 2 # OpenAPI Spec v3.1. OPEN_API_SPEC_3_1 = 3 end end # The operation details parsed from the spec. # @!attribute [rw] http_operation # @return [::Google::Cloud::ApiHub::V1::HttpOperation] # The HTTP Operation. # @!attribute [r] description # @return [::String] # Output only. Description of the operation behavior. # For OpenAPI spec, this will map to `operation.description` in the # spec, in case description is empty, `operation.summary` will be used. # @!attribute [r] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Output only. Additional external documentation for this operation. # For OpenAPI spec, this will map to `operation.documentation` in the spec. # @!attribute [r] deprecated # @return [::Boolean] # Output only. For OpenAPI spec, this will be set if `operation.deprecated`is # marked as `true` in the spec. class OperationDetails include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The HTTP Operation. # @!attribute [r] path # @return [::Google::Cloud::ApiHub::V1::Path] # Output only. The path details for the Operation. # @!attribute [r] method # @return [::Google::Cloud::ApiHub::V1::HttpOperation::Method] # Output only. Operation method class HttpOperation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Enumeration of Method types. module Method # Method unspecified. METHOD_UNSPECIFIED = 0 # Get Operation type. GET = 1 # Put Operation type. PUT = 2 # Post Operation type. POST = 3 # Delete Operation type. DELETE = 4 # Options Operation type. OPTIONS = 5 # Head Operation type. HEAD = 6 # Patch Operation type. PATCH = 7 # Trace Operation type. TRACE = 8 end end # The path details derived from the spec. # @!attribute [r] path # @return [::String] # Output only. Complete path relative to server endpoint. # @!attribute [r] description # @return [::String] # Output only. A short description for the path applicable to all operations. class Path include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The schema details derived from the spec. Currently, this entity is supported # for OpenAPI spec only. # For OpenAPI spec, this maps to the schema defined in # the `definitions` section for OpenAPI 2.0 version and in # `components.schemas` section for OpenAPI 3.0 and 3.1 version. # @!attribute [r] display_name # @return [::String] # Output only. The display name of the schema. # This will map to the name of the schema in the spec. # @!attribute [r] raw_value # @return [::String] # Output only. The raw value of the schema definition corresponding to the # schema name in the spec. class Schema include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Owner details. # @!attribute [rw] display_name # @return [::String] # Optional. The name of the owner. # @!attribute [rw] email # @return [::String] # Required. The email of the owner. class Owner include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Documentation details. # @!attribute [rw] external_uri # @return [::String] # Optional. The uri of the externally hosted documentation. class Documentation include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute values associated with resource. # @!attribute [rw] enum_values # @return [::Google::Cloud::ApiHub::V1::AttributeValues::EnumAttributeValues] # The attribute values associated with a resource in case attribute data # type is enum. # @!attribute [rw] string_values # @return [::Google::Cloud::ApiHub::V1::AttributeValues::StringAttributeValues] # The attribute values associated with a resource in case attribute data # type is string. # @!attribute [rw] json_values # @return [::Google::Cloud::ApiHub::V1::AttributeValues::StringAttributeValues] # The attribute values associated with a resource in case attribute data # type is JSON. # @!attribute [r] attribute # @return [::String] # Output only. The name of the attribute. # Format: projects/\\{project}/locations/\\{location}/attributes/\\{attribute} class AttributeValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The attribute values of data type enum. # @!attribute [rw] values # @return [::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>] # Required. The attribute values in case attribute data type is enum. class EnumAttributeValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The attribute values of data type string or JSON. # @!attribute [rw] values # @return [::Array<::String>] # Required. The attribute values in case attribute data type is string or # JSON. class StringAttributeValues include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A dependency resource defined in the API hub describes a dependency directed # from a consumer to a supplier entity. A dependency can be defined between two # [Operations][google.cloud.apihub.v1.Operation] or between # an [Operation][google.cloud.apihub.v1.Operation] and [External # API][google.cloud.apihub.v1.ExternalApi]. # @!attribute [rw] name # @return [::String] # Identifier. The name of the dependency in the API Hub. # # Format: `projects/{project}/locations/{location}/dependencies/{dependency}` # @!attribute [rw] consumer # @return [::Google::Cloud::ApiHub::V1::DependencyEntityReference] # Required. Immutable. The entity acting as the consumer in the dependency. # @!attribute [rw] supplier # @return [::Google::Cloud::ApiHub::V1::DependencyEntityReference] # Required. Immutable. The entity acting as the supplier in the dependency. # @!attribute [r] state # @return [::Google::Cloud::ApiHub::V1::Dependency::State] # Output only. State of the dependency. # @!attribute [rw] description # @return [::String] # Optional. Human readable description corresponding of the dependency. # @!attribute [r] discovery_mode # @return [::Google::Cloud::ApiHub::V1::Dependency::DiscoveryMode] # Output only. Discovery mode of the dependency. # @!attribute [r] error_detail # @return [::Google::Cloud::ApiHub::V1::DependencyErrorDetail] # Output only. Error details of a dependency if the system has detected it # internally. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the dependency was created. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. The time at which the dependency was last updated. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the # dependency resource. The key is the attribute name. It will be of the # format: `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. class Dependency include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Possible states for a dependency. module State # Default value. This value is unused. STATE_UNSPECIFIED = 0 # Dependency will be in a proposed state when it is newly identified by the # API hub on its own. PROPOSED = 1 # Dependency will be in a validated state when it is validated by the # admin or manually created in the API hub. VALIDATED = 2 end # Possible modes of discovering the dependency. module DiscoveryMode # Default value. This value is unused. DISCOVERY_MODE_UNSPECIFIED = 0 # Manual mode of discovery when the dependency is defined by the user. MANUAL = 1 end end # Reference to an entity participating in a dependency. # @!attribute [rw] operation_resource_name # @return [::String] # The resource name of an operation in the API Hub. # # Format: # `projects/{project}/locations/{location}/apis/{api}/versions/{version}/operations/{operation}` # @!attribute [rw] external_api_resource_name # @return [::String] # The resource name of an external API in the API Hub. # # Format: # `projects/{project}/locations/{location}/externalApis/{external_api}` # @!attribute [r] display_name # @return [::String] # Output only. Display name of the entity. class DependencyEntityReference include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Details describing error condition of a dependency. # @!attribute [rw] error # @return [::Google::Cloud::ApiHub::V1::DependencyErrorDetail::Error] # Optional. Error in the dependency. # @!attribute [rw] error_time # @return [::Google::Protobuf::Timestamp] # Optional. Timestamp at which the error was found. class DependencyErrorDetail include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Possible values representing an error in the dependency. module Error # Default value used for no error in the dependency. ERROR_UNSPECIFIED = 0 # Supplier entity has been deleted. SUPPLIER_NOT_FOUND = 1 # Supplier entity has been recreated. SUPPLIER_RECREATED = 2 end end # LintResponse contains the response from the linter. # @!attribute [rw] issues # @return [::Array<::Google::Cloud::ApiHub::V1::Issue>] # Optional. Array of issues found in the analyzed document. # @!attribute [rw] summary # @return [::Array<::Google::Cloud::ApiHub::V1::LintResponse::SummaryEntry>] # Optional. Summary of all issue types and counts for each severity level. # @!attribute [rw] state # @return [::Google::Cloud::ApiHub::V1::LintState] # Required. Lint state represents success or failure for linting. # @!attribute [rw] source # @return [::String] # Required. Name of the linting application. # @!attribute [rw] linter # @return [::Google::Cloud::ApiHub::V1::Linter] # Required. Name of the linter used. # @!attribute [rw] create_time # @return [::Google::Protobuf::Timestamp] # Required. Timestamp when the linting response was generated. class LintResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Count of issues with a given severity. # @!attribute [rw] severity # @return [::Google::Cloud::ApiHub::V1::Severity] # Required. Severity of the issue. # @!attribute [rw] count # @return [::Integer] # Required. Count of issues with the given severity. class SummaryEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Issue contains the details of a single issue found by the linter. # @!attribute [rw] code # @return [::String] # Required. Rule code unique to each rule defined in linter. # @!attribute [rw] path # @return [::Array<::String>] # Required. An array of strings indicating the location in the analyzed # document where the rule was triggered. # @!attribute [rw] message # @return [::String] # Required. Human-readable message describing the issue found by the linter. # @!attribute [rw] severity # @return [::Google::Cloud::ApiHub::V1::Severity] # Required. Severity level of the rule violation. # @!attribute [rw] range # @return [::Google::Cloud::ApiHub::V1::Range] # Required. Object describing where in the file the issue was found. class Issue include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Object describing where in the file the issue was found. # @!attribute [rw] start # @return [::Google::Cloud::ApiHub::V1::Point] # Required. Start of the issue. # @!attribute [rw] end # @return [::Google::Cloud::ApiHub::V1::Point] # Required. End of the issue. class Range include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Point within the file (line and character). # @!attribute [rw] line # @return [::Integer] # Required. Line number (zero-indexed). # @!attribute [rw] character # @return [::Integer] # Required. Character position within the line (zero-indexed). class Point include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the metadata of the long-running operation. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. The time the operation was created. # @!attribute [r] end_time # @return [::Google::Protobuf::Timestamp] # Output only. The time the operation finished running. # @!attribute [r] target # @return [::String] # Output only. Server-defined resource path for the target of the operation. # @!attribute [r] verb # @return [::String] # Output only. Name of the verb executed by the operation. # @!attribute [r] status_message # @return [::String] # Output only. Human-readable status of the operation, if any. # @!attribute [r] requested_cancellation # @return [::Boolean] # 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 google.rpc.Status.code} of 1, corresponding to # `Code.CANCELLED`. # @!attribute [r] api_version # @return [::String] # Output only. API version used to start the operation. class OperationMetadata include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # An ApiHubInstance represents the instance resources of the API Hub. # Currently, only one ApiHub instance is allowed for each project. # @!attribute [rw] name # @return [::String] # Identifier. Format: # `projects/{project}/locations/{location}/apiHubInstances/{apiHubInstance}`. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. Creation timestamp. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Last update timestamp. # @!attribute [r] state # @return [::Google::Cloud::ApiHub::V1::ApiHubInstance::State] # Output only. The current state of the ApiHub instance. # @!attribute [r] state_message # @return [::String] # Output only. Extra information about ApiHub instance state. Currently the # message would be populated when state is `FAILED`. # @!attribute [rw] config # @return [::Google::Cloud::ApiHub::V1::ApiHubInstance::Config] # Required. Config of the ApiHub instance. # @!attribute [rw] labels # @return [::Google::Protobuf::Map{::String => ::String}] # Optional. Instance labels to represent user-provided metadata. # Refer to cloud documentation on labels for more details. # https://cloud.google.com/compute/docs/labeling-resources # @!attribute [rw] description # @return [::String] # Optional. Description of the ApiHub instance. class ApiHubInstance include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Available configurations to provision an ApiHub Instance. # @!attribute [rw] cmek_key_name # @return [::String] # Required. The Customer Managed Encryption Key (CMEK) used for data # encryption. The CMEK name should follow the format of # `projects/([^/]+)/locations/([^/]+)/keyRings/([^/]+)/cryptoKeys/([^/]+)`, # where the location must match the instance location. class Config include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::String] class LabelsEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State of the ApiHub Instance. module State # The default value. This value is used if the state is omitted. STATE_UNSPECIFIED = 0 # The ApiHub instance has not been initialized or has been deleted. INACTIVE = 1 # The ApiHub instance is being created. CREATING = 2 # The ApiHub instance has been created and is ready for use. ACTIVE = 3 # The ApiHub instance is being updated. UPDATING = 4 # The ApiHub instance is being deleted. DELETING = 5 # The ApiHub instance encountered an error during a state change. FAILED = 6 end end # An external API represents an API being provided by external sources. This # can be used to model third-party APIs and can be used to define dependencies. # @!attribute [rw] name # @return [::String] # Identifier. Format: # `projects/{project}/locations/{location}/externalApi/{externalApi}`. # @!attribute [rw] display_name # @return [::String] # Required. Display name of the external API. Max length is 63 characters # (Unicode Code Points). # @!attribute [rw] description # @return [::String] # Optional. Description of the external API. Max length is 2000 characters # (Unicode Code Points). # @!attribute [rw] endpoints # @return [::Array<::String>] # Optional. List of endpoints on which this API is accessible. # @!attribute [rw] paths # @return [::Array<::String>] # Optional. List of paths served by this API. # @!attribute [rw] documentation # @return [::Google::Cloud::ApiHub::V1::Documentation] # Optional. Documentation of the external API. # @!attribute [rw] attributes # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::ApiHub::V1::AttributeValues}] # Optional. The list of user defined attributes associated with the Version # resource. The key is the attribute name. It will be of the format: # `projects/{project}/locations/{location}/attributes/{attribute}`. # The value is the attribute values associated with the resource. # @!attribute [r] create_time # @return [::Google::Protobuf::Timestamp] # Output only. Creation timestamp. # @!attribute [r] update_time # @return [::Google::Protobuf::Timestamp] # Output only. Last update timestamp. class ExternalApi include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # @!attribute [rw] key # @return [::String] # @!attribute [rw] value # @return [::Google::Cloud::ApiHub::V1::AttributeValues] class AttributesEntry include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Lint state represents success or failure for linting. module LintState # Lint state unspecified. LINT_STATE_UNSPECIFIED = 0 # Linting was completed successfully. LINT_STATE_SUCCESS = 1 # Linting encountered errors. LINT_STATE_ERROR = 2 end # Enumeration of linter types. module Linter # Linter type unspecified. LINTER_UNSPECIFIED = 0 # Linter type spectral. SPECTRAL = 1 # Linter type other. OTHER = 2 end # Severity of the issue. module Severity # Severity unspecified. SEVERITY_UNSPECIFIED = 0 # Severity error. SEVERITY_ERROR = 1 # Severity warning. SEVERITY_WARNING = 2 # Severity info. SEVERITY_INFO = 3 # Severity hint. SEVERITY_HINT = 4 end end end end end