public static final class ApiHubGrpc.ApiHubBlockingStub extends AbstractBlockingStub<ApiHubGrpc.ApiHubBlockingStub>
A stub to allow clients to do synchronous rpc calls to service ApiHub.
This service provides all methods related to the API hub.
Inheritance
java.lang.Object >
io.grpc.stub.AbstractStub >
io.grpc.stub.AbstractBlockingStub >
ApiHubGrpc.ApiHubBlockingStub
Inherited Members
io.grpc.stub.AbstractBlockingStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel)
io.grpc.stub.AbstractBlockingStub.<T>newStub(io.grpc.stub.AbstractStub.StubFactory<T>,io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.<T>withOption(io.grpc.CallOptions.Key<T>,T)
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
io.grpc.stub.AbstractStub.getCallOptions()
io.grpc.stub.AbstractStub.getChannel()
io.grpc.stub.AbstractStub.withCallCredentials(io.grpc.CallCredentials)
io.grpc.stub.AbstractStub.withChannel(io.grpc.Channel)
io.grpc.stub.AbstractStub.withCompression(java.lang.String)
io.grpc.stub.AbstractStub.withDeadline(io.grpc.Deadline)
io.grpc.stub.AbstractStub.withDeadlineAfter(long,java.util.concurrent.TimeUnit)
io.grpc.stub.AbstractStub.withExecutor(java.util.concurrent.Executor)
io.grpc.stub.AbstractStub.withInterceptors(io.grpc.ClientInterceptor...)
io.grpc.stub.AbstractStub.withMaxInboundMessageSize(int)
io.grpc.stub.AbstractStub.withMaxOutboundMessageSize(int)
io.grpc.stub.AbstractStub.withOnReadyThreshold(int)
io.grpc.stub.AbstractStub.withWaitForReady()
Methods
build(Channel channel, CallOptions callOptions)
protected ApiHubGrpc.ApiHubBlockingStub build(Channel channel, CallOptions callOptions)
Parameters |
Name |
Description |
channel |
io.grpc.Channel
|
callOptions |
io.grpc.CallOptions
|
Overrides
io.grpc.stub.AbstractStub.build(io.grpc.Channel,io.grpc.CallOptions)
createApi(CreateApiRequest request)
public Api createApi(CreateApiRequest request)
Create an API resource in the API hub.
Once an API resource is created, versions can be added to it.
Returns |
Type |
Description |
Api |
|
createAttribute(CreateAttributeRequest request)
public Attribute createAttribute(CreateAttributeRequest request)
Create a user defined attribute.
Certain pre defined attributes are already created by the API hub. These
attributes will have type as SYSTEM_DEFINED
and can be listed via
ListAttributes method.
Allowed values for the same can be updated via
UpdateAttribute method.
createDeployment(CreateDeploymentRequest request)
public Deployment createDeployment(CreateDeploymentRequest request)
Create a deployment resource in the API hub.
Once a deployment resource is created, it can be associated with API
versions.
createExternalApi(CreateExternalApiRequest request)
public ExternalApi createExternalApi(CreateExternalApiRequest request)
Create an External API resource in the API hub.
createSpec(CreateSpecRequest request)
public Spec createSpec(CreateSpecRequest request)
Add a spec to an API version in the API hub.
Multiple specs can be added to an API version.
Note, while adding a spec, at least one of contents
or source_uri
must
be provided. If contents
is provided, then spec_type
must also be
provided.
On adding a spec with contents to the version, the operations present in it
will be added to the version.Note that the file contents in the spec should
be of the same type as defined in the
projects/{project}/locations/{location}/attributes/system-spec-type
attribute associated with spec resource. Note that specs of various types
can be uploaded, however parsing of details is supported for OpenAPI spec
currently.
In order to access the information parsed from the spec, use the
GetSpec method.
In order to access the raw contents for a particular spec, use the
GetSpecContents method.
In order to access the operations parsed from the spec, use the
ListAPIOperations
method.
Returns |
Type |
Description |
Spec |
|
createVersion(CreateVersionRequest request)
public Version createVersion(CreateVersionRequest request)
Create an API version for an API resource in the API hub.
deleteApi(DeleteApiRequest request)
public Empty deleteApi(DeleteApiRequest request)
Delete an API resource in the API hub. API can only be deleted if all
underlying versions are deleted.
Returns |
Type |
Description |
Empty |
|
deleteAttribute(DeleteAttributeRequest request)
public Empty deleteAttribute(DeleteAttributeRequest request)
Delete an attribute.
Note: System defined attributes cannot be deleted. All
associations of the attribute being deleted with any API hub resource will
also get deleted.
Returns |
Type |
Description |
Empty |
|
deleteDeployment(DeleteDeploymentRequest request)
public Empty deleteDeployment(DeleteDeploymentRequest request)
Delete a deployment resource in the API hub.
Returns |
Type |
Description |
Empty |
|
deleteExternalApi(DeleteExternalApiRequest request)
public Empty deleteExternalApi(DeleteExternalApiRequest request)
Delete an External API resource in the API hub.
Returns |
Type |
Description |
Empty |
|
deleteSpec(DeleteSpecRequest request)
public Empty deleteSpec(DeleteSpecRequest request)
Delete a spec.
Deleting a spec will also delete the associated operations from the
version.
Returns |
Type |
Description |
Empty |
|
deleteVersion(DeleteVersionRequest request)
public Empty deleteVersion(DeleteVersionRequest request)
Delete an API version. Version can only be deleted if all underlying specs,
operations, definitions and linked deployments are deleted.
Returns |
Type |
Description |
Empty |
|
getApi(GetApiRequest request)
public Api getApi(GetApiRequest request)
Get API resource details including the API versions contained in it.
Returns |
Type |
Description |
Api |
|
getApiOperation(GetApiOperationRequest request)
public ApiOperation getApiOperation(GetApiOperationRequest request)
Get details about a particular operation in API version.
getAttribute(GetAttributeRequest request)
public Attribute getAttribute(GetAttributeRequest request)
Get details about the attribute.
getDefinition(GetDefinitionRequest request)
public Definition getDefinition(GetDefinitionRequest request)
Get details about a definition in an API version.
getDeployment(GetDeploymentRequest request)
public Deployment getDeployment(GetDeploymentRequest request)
Get details about a deployment and the API versions linked to it.
getExternalApi(GetExternalApiRequest request)
public ExternalApi getExternalApi(GetExternalApiRequest request)
Get details about an External API resource in the API hub.
getSpec(GetSpecRequest request)
public Spec getSpec(GetSpecRequest request)
Get details about the information parsed from a spec.
Note that this method does not return the raw spec contents.
Use GetSpecContents method
to retrieve the same.
Returns |
Type |
Description |
Spec |
|
getSpecContents(GetSpecContentsRequest request)
public SpecContents getSpecContents(GetSpecContentsRequest request)
getVersion(GetVersionRequest request)
public Version getVersion(GetVersionRequest request)
Get details about the API version of an API resource. This will include
information about the specs and operations present in the API
version as well as the deployments linked to it.
listApiOperations(ListApiOperationsRequest request)
public ListApiOperationsResponse listApiOperations(ListApiOperationsRequest request)
List operations in an API version.
listApis(ListApisRequest request)
public ListApisResponse listApis(ListApisRequest request)
List API resources in the API hub.
listAttributes(ListAttributesRequest request)
public ListAttributesResponse listAttributes(ListAttributesRequest request)
listDeployments(ListDeploymentsRequest request)
public ListDeploymentsResponse listDeployments(ListDeploymentsRequest request)
List deployment resources in the API hub.
listExternalApis(ListExternalApisRequest request)
public ListExternalApisResponse listExternalApis(ListExternalApisRequest request)
List External API resources in the API hub.
listSpecs(ListSpecsRequest request)
public ListSpecsResponse listSpecs(ListSpecsRequest request)
List specs corresponding to a particular API resource.
listVersions(ListVersionsRequest request)
public ListVersionsResponse listVersions(ListVersionsRequest request)
List API versions of an API resource in the API hub.
searchResources(SearchResourcesRequest request)
public SearchResourcesResponse searchResources(SearchResourcesRequest request)
Search across API-Hub resources.
updateApi(UpdateApiRequest request)
public Api updateApi(UpdateApiRequest request)
Update an API resource in the API hub. The following fields in the
[API][] can be updated:
- display_name
- description
- owner
- documentation
- target_user
- team
- business_unit
- maturity_level
- attributes
The
update_mask
should be used to specify the fields being updated.
Updating the owner field requires complete owner message
and updates both owner and email fields.
Returns |
Type |
Description |
Api |
|
updateAttribute(UpdateAttributeRequest request)
public Attribute updateAttribute(UpdateAttributeRequest request)
Update the attribute. The following fields in the
Attribute resource can be updated:
- display_name
The display name can be updated for user defined attributes only.
- description
The description can be updated for user defined attributes only.
- allowed_values
To update the list of allowed values, clients need to use the fetched list
of allowed values and add or remove values to or from the same list.
The mutable allowed values can be updated for both user defined and System
defined attributes. The immutable allowed values cannot be updated or
deleted. The updated list of allowed values cannot be empty. If an allowed
value that is already used by some resource's attribute is deleted, then
the association between the resource and the attribute value will also be
deleted.
- cardinality
The cardinality can be updated for user defined attributes only.
Cardinality can only be increased during an update.
The
update_mask
should be used to specify the fields being updated.
updateDeployment(UpdateDeploymentRequest request)
public Deployment updateDeployment(UpdateDeploymentRequest request)
Update a deployment resource in the API hub. The following fields in the
deployment resource can be
updated:
- display_name
- description
- documentation
- deployment_type
- resource_uri
- endpoints
- slo
- environment
- attributes
The
update_mask
should be used to specify the fields being updated.
updateExternalApi(UpdateExternalApiRequest request)
public ExternalApi updateExternalApi(UpdateExternalApiRequest request)
Update an External API resource in the API hub. The following fields can be
updated:
- display_name
- description
- documentation
- endpoints
- paths
The
update_mask
should be used to specify the fields being updated.
updateSpec(UpdateSpecRequest request)
public Spec updateSpec(UpdateSpecRequest request)
Update spec. The following fields in the
spec can be updated:
- display_name
- source_uri
- lint_response
- attributes
- contents
- spec_type
In case of an OAS spec, updating spec contents can lead to:
- Creation, deletion and update of operations.
- Creation, deletion and update of definitions.
- Update of other info parsed out from the new spec.
In case of contents or source_uri being present in update mask, spec_type
must also be present. Also, spec_type can not be present in update mask if
contents or source_uri is not present.
The
update_mask
should be used to specify the fields being updated.
Returns |
Type |
Description |
Spec |
|
updateVersion(UpdateVersionRequest request)
public Version updateVersion(UpdateVersionRequest request)
Update API version. The following fields in the
version can be updated currently:
- display_name
- description
- documentation
- deployments
- lifecycle
- compliance
- accreditation
- attributes
The
update_mask
should be used to specify the fields being updated.