// Copyright 2025 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. // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v4.25.7 // source: google/cloud/apihub/v1/apihub_service.proto package apihubpb import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 const ( ApiHub_CreateApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateApi" ApiHub_GetApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetApi" ApiHub_ListApis_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListApis" ApiHub_UpdateApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateApi" ApiHub_DeleteApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteApi" ApiHub_CreateVersion_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateVersion" ApiHub_GetVersion_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetVersion" ApiHub_ListVersions_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListVersions" ApiHub_UpdateVersion_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateVersion" ApiHub_DeleteVersion_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteVersion" ApiHub_CreateSpec_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateSpec" ApiHub_GetSpec_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetSpec" ApiHub_GetSpecContents_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetSpecContents" ApiHub_ListSpecs_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListSpecs" ApiHub_UpdateSpec_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateSpec" ApiHub_DeleteSpec_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteSpec" ApiHub_CreateApiOperation_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateApiOperation" ApiHub_GetApiOperation_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetApiOperation" ApiHub_ListApiOperations_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListApiOperations" ApiHub_UpdateApiOperation_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateApiOperation" ApiHub_DeleteApiOperation_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteApiOperation" ApiHub_GetDefinition_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetDefinition" ApiHub_CreateDeployment_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateDeployment" ApiHub_GetDeployment_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetDeployment" ApiHub_ListDeployments_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListDeployments" ApiHub_UpdateDeployment_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateDeployment" ApiHub_DeleteDeployment_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteDeployment" ApiHub_CreateAttribute_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateAttribute" ApiHub_GetAttribute_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetAttribute" ApiHub_UpdateAttribute_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateAttribute" ApiHub_DeleteAttribute_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteAttribute" ApiHub_ListAttributes_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListAttributes" ApiHub_SearchResources_FullMethodName = "/google.cloud.apihub.v1.ApiHub/SearchResources" ApiHub_CreateExternalApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/CreateExternalApi" ApiHub_GetExternalApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/GetExternalApi" ApiHub_UpdateExternalApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/UpdateExternalApi" ApiHub_DeleteExternalApi_FullMethodName = "/google.cloud.apihub.v1.ApiHub/DeleteExternalApi" ApiHub_ListExternalApis_FullMethodName = "/google.cloud.apihub.v1.ApiHub/ListExternalApis" ) // ApiHubClient is the client API for ApiHub service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ApiHubClient interface { // Create an API resource in the API hub. // Once an API resource is created, versions can be added to it. CreateApi(ctx context.Context, in *CreateApiRequest, opts ...grpc.CallOption) (*Api, error) // Get API resource details including the API versions contained in it. GetApi(ctx context.Context, in *GetApiRequest, opts ...grpc.CallOption) (*Api, error) // List API resources in the API hub. ListApis(ctx context.Context, in *ListApisRequest, opts ...grpc.CallOption) (*ListApisResponse, error) // Update an API resource in the API hub. The following fields in the // [API][google.cloud.apihub.v1.Api] can be updated: // // * [display_name][google.cloud.apihub.v1.Api.display_name] // * [description][google.cloud.apihub.v1.Api.description] // * [owner][google.cloud.apihub.v1.Api.owner] // * [documentation][google.cloud.apihub.v1.Api.documentation] // * [target_user][google.cloud.apihub.v1.Api.target_user] // * [team][google.cloud.apihub.v1.Api.team] // * [business_unit][google.cloud.apihub.v1.Api.business_unit] // * [maturity_level][google.cloud.apihub.v1.Api.maturity_level] // * [api_style][google.cloud.apihub.v1.Api.api_style] // * [attributes][google.cloud.apihub.v1.Api.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiRequest.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. UpdateApi(ctx context.Context, in *UpdateApiRequest, opts ...grpc.CallOption) (*Api, error) // Delete an API resource in the API hub. API can only be deleted if all // underlying versions are deleted. DeleteApi(ctx context.Context, in *DeleteApiRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Create an API version for an API resource in the API hub. CreateVersion(ctx context.Context, in *CreateVersionRequest, opts ...grpc.CallOption) (*Version, error) // 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. GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*Version, error) // List API versions of an API resource in the API hub. ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) // Update API version. The following fields in the // [version][google.cloud.apihub.v1.Version] can be updated currently: // // * [display_name][google.cloud.apihub.v1.Version.display_name] // * [description][google.cloud.apihub.v1.Version.description] // * [documentation][google.cloud.apihub.v1.Version.documentation] // * [deployments][google.cloud.apihub.v1.Version.deployments] // * [lifecycle][google.cloud.apihub.v1.Version.lifecycle] // * [compliance][google.cloud.apihub.v1.Version.compliance] // * [accreditation][google.cloud.apihub.v1.Version.accreditation] // * [attributes][google.cloud.apihub.v1.Version.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateVersionRequest.update_mask] // should be used to specify the fields being updated. UpdateVersion(ctx context.Context, in *UpdateVersionRequest, opts ...grpc.CallOption) (*Version, error) // Delete an API version. Version can only be deleted if all underlying specs, // operations, definitions and linked deployments are deleted. DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 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][google.cloud.apihub.v1.ApiHub.GetSpec] method. // In order to access the raw contents for a particular spec, use the // [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method. // In order to access the operations parsed from the spec, use the // [ListAPIOperations][google.cloud.apihub.v1.ApiHub.ListApiOperations] // method. CreateSpec(ctx context.Context, in *CreateSpecRequest, opts ...grpc.CallOption) (*Spec, error) // Get details about the information parsed from a spec. // Note that this method does not return the raw spec contents. // Use [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method // to retrieve the same. GetSpec(ctx context.Context, in *GetSpecRequest, opts ...grpc.CallOption) (*Spec, error) // Get spec contents. GetSpecContents(ctx context.Context, in *GetSpecContentsRequest, opts ...grpc.CallOption) (*SpecContents, error) // List specs corresponding to a particular API resource. ListSpecs(ctx context.Context, in *ListSpecsRequest, opts ...grpc.CallOption) (*ListSpecsResponse, error) // Update spec. The following fields in the // [spec][google.cloud.apihub.v1.Spec] can be updated: // // * [display_name][google.cloud.apihub.v1.Spec.display_name] // * [source_uri][google.cloud.apihub.v1.Spec.source_uri] // * [lint_response][google.cloud.apihub.v1.Spec.lint_response] // * [attributes][google.cloud.apihub.v1.Spec.attributes] // * [contents][google.cloud.apihub.v1.Spec.contents] // * [spec_type][google.cloud.apihub.v1.Spec.spec_type] // // In case of an OAS spec, updating spec contents can lead to: // 1. Creation, deletion and update of operations. // 2. Creation, deletion and update of definitions. // 3. 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][google.cloud.apihub.v1.UpdateSpecRequest.update_mask] // should be used to specify the fields being updated. UpdateSpec(ctx context.Context, in *UpdateSpecRequest, opts ...grpc.CallOption) (*Spec, error) // Delete a spec. // Deleting a spec will also delete the associated operations from the // version. DeleteSpec(ctx context.Context, in *DeleteSpecRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Create an apiOperation in an API version. // An apiOperation can be created only if the version has no apiOperations // which were created by parsing a spec. CreateApiOperation(ctx context.Context, in *CreateApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) // Get details about a particular operation in API version. GetApiOperation(ctx context.Context, in *GetApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) // List operations in an API version. ListApiOperations(ctx context.Context, in *ListApiOperationsRequest, opts ...grpc.CallOption) (*ListApiOperationsResponse, error) // Update an operation in an API version. The following fields in the // [ApiOperation resource][google.cloud.apihub.v1.ApiOperation] can be // updated: // // * [details.description][ApiOperation.details.description] // * [details.documentation][ApiOperation.details.documentation] // * [details.http_operation.path][ApiOperation.details.http_operation.path.path] // * [details.http_operation.method][ApiOperation.details.http_operation.method] // * [details.deprecated][ApiOperation.details.deprecated] // * [attributes][google.cloud.apihub.v1.ApiOperation.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] // should be used to specify the fields being updated. // // An operation can be updated only if the operation was created via // [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. // If the operation was created by parsing the spec, then it can be edited by // updating the spec. UpdateApiOperation(ctx context.Context, in *UpdateApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) // Delete an operation in an API version and we can delete only the // operations created via create API. If the operation was created by parsing // the spec, then it can be deleted by editing or deleting the spec. DeleteApiOperation(ctx context.Context, in *DeleteApiOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Get details about a definition in an API version. GetDefinition(ctx context.Context, in *GetDefinitionRequest, opts ...grpc.CallOption) (*Definition, error) // Create a deployment resource in the API hub. // Once a deployment resource is created, it can be associated with API // versions. CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) // Get details about a deployment and the API versions linked to it. GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) // List deployment resources in the API hub. ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) // Update a deployment resource in the API hub. The following fields in the // [deployment resource][google.cloud.apihub.v1.Deployment] can be // updated: // // * [display_name][google.cloud.apihub.v1.Deployment.display_name] // * [description][google.cloud.apihub.v1.Deployment.description] // * [documentation][google.cloud.apihub.v1.Deployment.documentation] // * [deployment_type][google.cloud.apihub.v1.Deployment.deployment_type] // * [resource_uri][google.cloud.apihub.v1.Deployment.resource_uri] // * [endpoints][google.cloud.apihub.v1.Deployment.endpoints] // * [slo][google.cloud.apihub.v1.Deployment.slo] // * [environment][google.cloud.apihub.v1.Deployment.environment] // * [attributes][google.cloud.apihub.v1.Deployment.attributes] // * [source_project] [google.cloud.apihub.v1.Deployment.source_project] // * [source_environment] // [google.cloud.apihub.v1.Deployment.source_environment] // * [management_url][google.cloud.apihub.v1.Deployment.management_url] // * [source_uri][google.cloud.apihub.v1.Deployment.source_uri] // The // [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] // should be used to specify the fields being updated. UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) // Delete a deployment resource in the API hub. DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // 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][google.cloud.apihub.v1.ApiHub.ListAttributes] method. // Allowed values for the same can be updated via // [UpdateAttribute][google.cloud.apihub.v1.ApiHub.UpdateAttribute] method. CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) // Get details about the attribute. GetAttribute(ctx context.Context, in *GetAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) // Update the attribute. The following fields in the // [Attribute resource][google.cloud.apihub.v1.Attribute] can be updated: // // * [display_name][google.cloud.apihub.v1.Attribute.display_name] // The display name can be updated for user defined attributes only. // * [description][google.cloud.apihub.v1.Attribute.description] // The description can be updated for user defined attributes only. // * [allowed_values][google.cloud.apihub.v1.Attribute.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][google.cloud.apihub.v1.Attribute.cardinality] // The cardinality can be updated for user defined attributes only. // Cardinality can only be increased during an update. // // The // [update_mask][google.cloud.apihub.v1.UpdateAttributeRequest.update_mask] // should be used to specify the fields being updated. UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) // 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. DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // List all attributes. ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) // Search across API-Hub resources. SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error) // Create an External API resource in the API hub. CreateExternalApi(ctx context.Context, in *CreateExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) // Get details about an External API resource in the API hub. GetExternalApi(ctx context.Context, in *GetExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) // Update an External API resource in the API hub. The following fields can be // updated: // // * [display_name][google.cloud.apihub.v1.ExternalApi.display_name] // * [description][google.cloud.apihub.v1.ExternalApi.description] // * [documentation][google.cloud.apihub.v1.ExternalApi.documentation] // * [endpoints][google.cloud.apihub.v1.ExternalApi.endpoints] // * [paths][google.cloud.apihub.v1.ExternalApi.paths] // // The // [update_mask][google.cloud.apihub.v1.UpdateExternalApiRequest.update_mask] // should be used to specify the fields being updated. UpdateExternalApi(ctx context.Context, in *UpdateExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) // Delete an External API resource in the API hub. DeleteExternalApi(ctx context.Context, in *DeleteExternalApiRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // List External API resources in the API hub. ListExternalApis(ctx context.Context, in *ListExternalApisRequest, opts ...grpc.CallOption) (*ListExternalApisResponse, error) } type apiHubClient struct { cc grpc.ClientConnInterface } func NewApiHubClient(cc grpc.ClientConnInterface) ApiHubClient { return &apiHubClient{cc} } func (c *apiHubClient) CreateApi(ctx context.Context, in *CreateApiRequest, opts ...grpc.CallOption) (*Api, error) { out := new(Api) err := c.cc.Invoke(ctx, ApiHub_CreateApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetApi(ctx context.Context, in *GetApiRequest, opts ...grpc.CallOption) (*Api, error) { out := new(Api) err := c.cc.Invoke(ctx, ApiHub_GetApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListApis(ctx context.Context, in *ListApisRequest, opts ...grpc.CallOption) (*ListApisResponse, error) { out := new(ListApisResponse) err := c.cc.Invoke(ctx, ApiHub_ListApis_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateApi(ctx context.Context, in *UpdateApiRequest, opts ...grpc.CallOption) (*Api, error) { out := new(Api) err := c.cc.Invoke(ctx, ApiHub_UpdateApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteApi(ctx context.Context, in *DeleteApiRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateVersion(ctx context.Context, in *CreateVersionRequest, opts ...grpc.CallOption) (*Version, error) { out := new(Version) err := c.cc.Invoke(ctx, ApiHub_CreateVersion_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetVersion(ctx context.Context, in *GetVersionRequest, opts ...grpc.CallOption) (*Version, error) { out := new(Version) err := c.cc.Invoke(ctx, ApiHub_GetVersion_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListVersions(ctx context.Context, in *ListVersionsRequest, opts ...grpc.CallOption) (*ListVersionsResponse, error) { out := new(ListVersionsResponse) err := c.cc.Invoke(ctx, ApiHub_ListVersions_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateVersion(ctx context.Context, in *UpdateVersionRequest, opts ...grpc.CallOption) (*Version, error) { out := new(Version) err := c.cc.Invoke(ctx, ApiHub_UpdateVersion_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteVersion(ctx context.Context, in *DeleteVersionRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteVersion_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateSpec(ctx context.Context, in *CreateSpecRequest, opts ...grpc.CallOption) (*Spec, error) { out := new(Spec) err := c.cc.Invoke(ctx, ApiHub_CreateSpec_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetSpec(ctx context.Context, in *GetSpecRequest, opts ...grpc.CallOption) (*Spec, error) { out := new(Spec) err := c.cc.Invoke(ctx, ApiHub_GetSpec_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetSpecContents(ctx context.Context, in *GetSpecContentsRequest, opts ...grpc.CallOption) (*SpecContents, error) { out := new(SpecContents) err := c.cc.Invoke(ctx, ApiHub_GetSpecContents_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListSpecs(ctx context.Context, in *ListSpecsRequest, opts ...grpc.CallOption) (*ListSpecsResponse, error) { out := new(ListSpecsResponse) err := c.cc.Invoke(ctx, ApiHub_ListSpecs_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateSpec(ctx context.Context, in *UpdateSpecRequest, opts ...grpc.CallOption) (*Spec, error) { out := new(Spec) err := c.cc.Invoke(ctx, ApiHub_UpdateSpec_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteSpec(ctx context.Context, in *DeleteSpecRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteSpec_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateApiOperation(ctx context.Context, in *CreateApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) { out := new(ApiOperation) err := c.cc.Invoke(ctx, ApiHub_CreateApiOperation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetApiOperation(ctx context.Context, in *GetApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) { out := new(ApiOperation) err := c.cc.Invoke(ctx, ApiHub_GetApiOperation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListApiOperations(ctx context.Context, in *ListApiOperationsRequest, opts ...grpc.CallOption) (*ListApiOperationsResponse, error) { out := new(ListApiOperationsResponse) err := c.cc.Invoke(ctx, ApiHub_ListApiOperations_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateApiOperation(ctx context.Context, in *UpdateApiOperationRequest, opts ...grpc.CallOption) (*ApiOperation, error) { out := new(ApiOperation) err := c.cc.Invoke(ctx, ApiHub_UpdateApiOperation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteApiOperation(ctx context.Context, in *DeleteApiOperationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteApiOperation_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetDefinition(ctx context.Context, in *GetDefinitionRequest, opts ...grpc.CallOption) (*Definition, error) { out := new(Definition) err := c.cc.Invoke(ctx, ApiHub_GetDefinition_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateDeployment(ctx context.Context, in *CreateDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) { out := new(Deployment) err := c.cc.Invoke(ctx, ApiHub_CreateDeployment_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetDeployment(ctx context.Context, in *GetDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) { out := new(Deployment) err := c.cc.Invoke(ctx, ApiHub_GetDeployment_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListDeployments(ctx context.Context, in *ListDeploymentsRequest, opts ...grpc.CallOption) (*ListDeploymentsResponse, error) { out := new(ListDeploymentsResponse) err := c.cc.Invoke(ctx, ApiHub_ListDeployments_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateDeployment(ctx context.Context, in *UpdateDeploymentRequest, opts ...grpc.CallOption) (*Deployment, error) { out := new(Deployment) err := c.cc.Invoke(ctx, ApiHub_UpdateDeployment_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteDeployment(ctx context.Context, in *DeleteDeploymentRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteDeployment_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateAttribute(ctx context.Context, in *CreateAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) { out := new(Attribute) err := c.cc.Invoke(ctx, ApiHub_CreateAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetAttribute(ctx context.Context, in *GetAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) { out := new(Attribute) err := c.cc.Invoke(ctx, ApiHub_GetAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateAttribute(ctx context.Context, in *UpdateAttributeRequest, opts ...grpc.CallOption) (*Attribute, error) { out := new(Attribute) err := c.cc.Invoke(ctx, ApiHub_UpdateAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteAttribute(ctx context.Context, in *DeleteAttributeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteAttribute_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListAttributes(ctx context.Context, in *ListAttributesRequest, opts ...grpc.CallOption) (*ListAttributesResponse, error) { out := new(ListAttributesResponse) err := c.cc.Invoke(ctx, ApiHub_ListAttributes_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) SearchResources(ctx context.Context, in *SearchResourcesRequest, opts ...grpc.CallOption) (*SearchResourcesResponse, error) { out := new(SearchResourcesResponse) err := c.cc.Invoke(ctx, ApiHub_SearchResources_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) CreateExternalApi(ctx context.Context, in *CreateExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) { out := new(ExternalApi) err := c.cc.Invoke(ctx, ApiHub_CreateExternalApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) GetExternalApi(ctx context.Context, in *GetExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) { out := new(ExternalApi) err := c.cc.Invoke(ctx, ApiHub_GetExternalApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) UpdateExternalApi(ctx context.Context, in *UpdateExternalApiRequest, opts ...grpc.CallOption) (*ExternalApi, error) { out := new(ExternalApi) err := c.cc.Invoke(ctx, ApiHub_UpdateExternalApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) DeleteExternalApi(ctx context.Context, in *DeleteExternalApiRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHub_DeleteExternalApi_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubClient) ListExternalApis(ctx context.Context, in *ListExternalApisRequest, opts ...grpc.CallOption) (*ListExternalApisResponse, error) { out := new(ListExternalApisResponse) err := c.cc.Invoke(ctx, ApiHub_ListExternalApis_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ApiHubServer is the server API for ApiHub service. // All implementations should embed UnimplementedApiHubServer // for forward compatibility type ApiHubServer interface { // Create an API resource in the API hub. // Once an API resource is created, versions can be added to it. CreateApi(context.Context, *CreateApiRequest) (*Api, error) // Get API resource details including the API versions contained in it. GetApi(context.Context, *GetApiRequest) (*Api, error) // List API resources in the API hub. ListApis(context.Context, *ListApisRequest) (*ListApisResponse, error) // Update an API resource in the API hub. The following fields in the // [API][google.cloud.apihub.v1.Api] can be updated: // // * [display_name][google.cloud.apihub.v1.Api.display_name] // * [description][google.cloud.apihub.v1.Api.description] // * [owner][google.cloud.apihub.v1.Api.owner] // * [documentation][google.cloud.apihub.v1.Api.documentation] // * [target_user][google.cloud.apihub.v1.Api.target_user] // * [team][google.cloud.apihub.v1.Api.team] // * [business_unit][google.cloud.apihub.v1.Api.business_unit] // * [maturity_level][google.cloud.apihub.v1.Api.maturity_level] // * [api_style][google.cloud.apihub.v1.Api.api_style] // * [attributes][google.cloud.apihub.v1.Api.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiRequest.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. UpdateApi(context.Context, *UpdateApiRequest) (*Api, error) // Delete an API resource in the API hub. API can only be deleted if all // underlying versions are deleted. DeleteApi(context.Context, *DeleteApiRequest) (*emptypb.Empty, error) // Create an API version for an API resource in the API hub. CreateVersion(context.Context, *CreateVersionRequest) (*Version, error) // 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. GetVersion(context.Context, *GetVersionRequest) (*Version, error) // List API versions of an API resource in the API hub. ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) // Update API version. The following fields in the // [version][google.cloud.apihub.v1.Version] can be updated currently: // // * [display_name][google.cloud.apihub.v1.Version.display_name] // * [description][google.cloud.apihub.v1.Version.description] // * [documentation][google.cloud.apihub.v1.Version.documentation] // * [deployments][google.cloud.apihub.v1.Version.deployments] // * [lifecycle][google.cloud.apihub.v1.Version.lifecycle] // * [compliance][google.cloud.apihub.v1.Version.compliance] // * [accreditation][google.cloud.apihub.v1.Version.accreditation] // * [attributes][google.cloud.apihub.v1.Version.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateVersionRequest.update_mask] // should be used to specify the fields being updated. UpdateVersion(context.Context, *UpdateVersionRequest) (*Version, error) // Delete an API version. Version can only be deleted if all underlying specs, // operations, definitions and linked deployments are deleted. DeleteVersion(context.Context, *DeleteVersionRequest) (*emptypb.Empty, error) // 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][google.cloud.apihub.v1.ApiHub.GetSpec] method. // In order to access the raw contents for a particular spec, use the // [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method. // In order to access the operations parsed from the spec, use the // [ListAPIOperations][google.cloud.apihub.v1.ApiHub.ListApiOperations] // method. CreateSpec(context.Context, *CreateSpecRequest) (*Spec, error) // Get details about the information parsed from a spec. // Note that this method does not return the raw spec contents. // Use [GetSpecContents][google.cloud.apihub.v1.ApiHub.GetSpecContents] method // to retrieve the same. GetSpec(context.Context, *GetSpecRequest) (*Spec, error) // Get spec contents. GetSpecContents(context.Context, *GetSpecContentsRequest) (*SpecContents, error) // List specs corresponding to a particular API resource. ListSpecs(context.Context, *ListSpecsRequest) (*ListSpecsResponse, error) // Update spec. The following fields in the // [spec][google.cloud.apihub.v1.Spec] can be updated: // // * [display_name][google.cloud.apihub.v1.Spec.display_name] // * [source_uri][google.cloud.apihub.v1.Spec.source_uri] // * [lint_response][google.cloud.apihub.v1.Spec.lint_response] // * [attributes][google.cloud.apihub.v1.Spec.attributes] // * [contents][google.cloud.apihub.v1.Spec.contents] // * [spec_type][google.cloud.apihub.v1.Spec.spec_type] // // In case of an OAS spec, updating spec contents can lead to: // 1. Creation, deletion and update of operations. // 2. Creation, deletion and update of definitions. // 3. 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][google.cloud.apihub.v1.UpdateSpecRequest.update_mask] // should be used to specify the fields being updated. UpdateSpec(context.Context, *UpdateSpecRequest) (*Spec, error) // Delete a spec. // Deleting a spec will also delete the associated operations from the // version. DeleteSpec(context.Context, *DeleteSpecRequest) (*emptypb.Empty, error) // Create an apiOperation in an API version. // An apiOperation can be created only if the version has no apiOperations // which were created by parsing a spec. CreateApiOperation(context.Context, *CreateApiOperationRequest) (*ApiOperation, error) // Get details about a particular operation in API version. GetApiOperation(context.Context, *GetApiOperationRequest) (*ApiOperation, error) // List operations in an API version. ListApiOperations(context.Context, *ListApiOperationsRequest) (*ListApiOperationsResponse, error) // Update an operation in an API version. The following fields in the // [ApiOperation resource][google.cloud.apihub.v1.ApiOperation] can be // updated: // // * [details.description][ApiOperation.details.description] // * [details.documentation][ApiOperation.details.documentation] // * [details.http_operation.path][ApiOperation.details.http_operation.path.path] // * [details.http_operation.method][ApiOperation.details.http_operation.method] // * [details.deprecated][ApiOperation.details.deprecated] // * [attributes][google.cloud.apihub.v1.ApiOperation.attributes] // // The // [update_mask][google.cloud.apihub.v1.UpdateApiOperationRequest.update_mask] // should be used to specify the fields being updated. // // An operation can be updated only if the operation was created via // [CreateApiOperation][google.cloud.apihub.v1.ApiHub.CreateApiOperation] API. // If the operation was created by parsing the spec, then it can be edited by // updating the spec. UpdateApiOperation(context.Context, *UpdateApiOperationRequest) (*ApiOperation, error) // Delete an operation in an API version and we can delete only the // operations created via create API. If the operation was created by parsing // the spec, then it can be deleted by editing or deleting the spec. DeleteApiOperation(context.Context, *DeleteApiOperationRequest) (*emptypb.Empty, error) // Get details about a definition in an API version. GetDefinition(context.Context, *GetDefinitionRequest) (*Definition, error) // Create a deployment resource in the API hub. // Once a deployment resource is created, it can be associated with API // versions. CreateDeployment(context.Context, *CreateDeploymentRequest) (*Deployment, error) // Get details about a deployment and the API versions linked to it. GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) // List deployment resources in the API hub. ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) // Update a deployment resource in the API hub. The following fields in the // [deployment resource][google.cloud.apihub.v1.Deployment] can be // updated: // // * [display_name][google.cloud.apihub.v1.Deployment.display_name] // * [description][google.cloud.apihub.v1.Deployment.description] // * [documentation][google.cloud.apihub.v1.Deployment.documentation] // * [deployment_type][google.cloud.apihub.v1.Deployment.deployment_type] // * [resource_uri][google.cloud.apihub.v1.Deployment.resource_uri] // * [endpoints][google.cloud.apihub.v1.Deployment.endpoints] // * [slo][google.cloud.apihub.v1.Deployment.slo] // * [environment][google.cloud.apihub.v1.Deployment.environment] // * [attributes][google.cloud.apihub.v1.Deployment.attributes] // * [source_project] [google.cloud.apihub.v1.Deployment.source_project] // * [source_environment] // [google.cloud.apihub.v1.Deployment.source_environment] // * [management_url][google.cloud.apihub.v1.Deployment.management_url] // * [source_uri][google.cloud.apihub.v1.Deployment.source_uri] // The // [update_mask][google.cloud.apihub.v1.UpdateDeploymentRequest.update_mask] // should be used to specify the fields being updated. UpdateDeployment(context.Context, *UpdateDeploymentRequest) (*Deployment, error) // Delete a deployment resource in the API hub. DeleteDeployment(context.Context, *DeleteDeploymentRequest) (*emptypb.Empty, error) // 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][google.cloud.apihub.v1.ApiHub.ListAttributes] method. // Allowed values for the same can be updated via // [UpdateAttribute][google.cloud.apihub.v1.ApiHub.UpdateAttribute] method. CreateAttribute(context.Context, *CreateAttributeRequest) (*Attribute, error) // Get details about the attribute. GetAttribute(context.Context, *GetAttributeRequest) (*Attribute, error) // Update the attribute. The following fields in the // [Attribute resource][google.cloud.apihub.v1.Attribute] can be updated: // // * [display_name][google.cloud.apihub.v1.Attribute.display_name] // The display name can be updated for user defined attributes only. // * [description][google.cloud.apihub.v1.Attribute.description] // The description can be updated for user defined attributes only. // * [allowed_values][google.cloud.apihub.v1.Attribute.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][google.cloud.apihub.v1.Attribute.cardinality] // The cardinality can be updated for user defined attributes only. // Cardinality can only be increased during an update. // // The // [update_mask][google.cloud.apihub.v1.UpdateAttributeRequest.update_mask] // should be used to specify the fields being updated. UpdateAttribute(context.Context, *UpdateAttributeRequest) (*Attribute, error) // 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. DeleteAttribute(context.Context, *DeleteAttributeRequest) (*emptypb.Empty, error) // List all attributes. ListAttributes(context.Context, *ListAttributesRequest) (*ListAttributesResponse, error) // Search across API-Hub resources. SearchResources(context.Context, *SearchResourcesRequest) (*SearchResourcesResponse, error) // Create an External API resource in the API hub. CreateExternalApi(context.Context, *CreateExternalApiRequest) (*ExternalApi, error) // Get details about an External API resource in the API hub. GetExternalApi(context.Context, *GetExternalApiRequest) (*ExternalApi, error) // Update an External API resource in the API hub. The following fields can be // updated: // // * [display_name][google.cloud.apihub.v1.ExternalApi.display_name] // * [description][google.cloud.apihub.v1.ExternalApi.description] // * [documentation][google.cloud.apihub.v1.ExternalApi.documentation] // * [endpoints][google.cloud.apihub.v1.ExternalApi.endpoints] // * [paths][google.cloud.apihub.v1.ExternalApi.paths] // // The // [update_mask][google.cloud.apihub.v1.UpdateExternalApiRequest.update_mask] // should be used to specify the fields being updated. UpdateExternalApi(context.Context, *UpdateExternalApiRequest) (*ExternalApi, error) // Delete an External API resource in the API hub. DeleteExternalApi(context.Context, *DeleteExternalApiRequest) (*emptypb.Empty, error) // List External API resources in the API hub. ListExternalApis(context.Context, *ListExternalApisRequest) (*ListExternalApisResponse, error) } // UnimplementedApiHubServer should be embedded to have forward compatible implementations. type UnimplementedApiHubServer struct { } func (UnimplementedApiHubServer) CreateApi(context.Context, *CreateApiRequest) (*Api, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateApi not implemented") } func (UnimplementedApiHubServer) GetApi(context.Context, *GetApiRequest) (*Api, error) { return nil, status.Errorf(codes.Unimplemented, "method GetApi not implemented") } func (UnimplementedApiHubServer) ListApis(context.Context, *ListApisRequest) (*ListApisResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListApis not implemented") } func (UnimplementedApiHubServer) UpdateApi(context.Context, *UpdateApiRequest) (*Api, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateApi not implemented") } func (UnimplementedApiHubServer) DeleteApi(context.Context, *DeleteApiRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteApi not implemented") } func (UnimplementedApiHubServer) CreateVersion(context.Context, *CreateVersionRequest) (*Version, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateVersion not implemented") } func (UnimplementedApiHubServer) GetVersion(context.Context, *GetVersionRequest) (*Version, error) { return nil, status.Errorf(codes.Unimplemented, "method GetVersion not implemented") } func (UnimplementedApiHubServer) ListVersions(context.Context, *ListVersionsRequest) (*ListVersionsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListVersions not implemented") } func (UnimplementedApiHubServer) UpdateVersion(context.Context, *UpdateVersionRequest) (*Version, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateVersion not implemented") } func (UnimplementedApiHubServer) DeleteVersion(context.Context, *DeleteVersionRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteVersion not implemented") } func (UnimplementedApiHubServer) CreateSpec(context.Context, *CreateSpecRequest) (*Spec, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateSpec not implemented") } func (UnimplementedApiHubServer) GetSpec(context.Context, *GetSpecRequest) (*Spec, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSpec not implemented") } func (UnimplementedApiHubServer) GetSpecContents(context.Context, *GetSpecContentsRequest) (*SpecContents, error) { return nil, status.Errorf(codes.Unimplemented, "method GetSpecContents not implemented") } func (UnimplementedApiHubServer) ListSpecs(context.Context, *ListSpecsRequest) (*ListSpecsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListSpecs not implemented") } func (UnimplementedApiHubServer) UpdateSpec(context.Context, *UpdateSpecRequest) (*Spec, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSpec not implemented") } func (UnimplementedApiHubServer) DeleteSpec(context.Context, *DeleteSpecRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteSpec not implemented") } func (UnimplementedApiHubServer) CreateApiOperation(context.Context, *CreateApiOperationRequest) (*ApiOperation, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateApiOperation not implemented") } func (UnimplementedApiHubServer) GetApiOperation(context.Context, *GetApiOperationRequest) (*ApiOperation, error) { return nil, status.Errorf(codes.Unimplemented, "method GetApiOperation not implemented") } func (UnimplementedApiHubServer) ListApiOperations(context.Context, *ListApiOperationsRequest) (*ListApiOperationsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListApiOperations not implemented") } func (UnimplementedApiHubServer) UpdateApiOperation(context.Context, *UpdateApiOperationRequest) (*ApiOperation, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateApiOperation not implemented") } func (UnimplementedApiHubServer) DeleteApiOperation(context.Context, *DeleteApiOperationRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteApiOperation not implemented") } func (UnimplementedApiHubServer) GetDefinition(context.Context, *GetDefinitionRequest) (*Definition, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDefinition not implemented") } func (UnimplementedApiHubServer) CreateDeployment(context.Context, *CreateDeploymentRequest) (*Deployment, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDeployment not implemented") } func (UnimplementedApiHubServer) GetDeployment(context.Context, *GetDeploymentRequest) (*Deployment, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDeployment not implemented") } func (UnimplementedApiHubServer) ListDeployments(context.Context, *ListDeploymentsRequest) (*ListDeploymentsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDeployments not implemented") } func (UnimplementedApiHubServer) UpdateDeployment(context.Context, *UpdateDeploymentRequest) (*Deployment, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDeployment not implemented") } func (UnimplementedApiHubServer) DeleteDeployment(context.Context, *DeleteDeploymentRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDeployment not implemented") } func (UnimplementedApiHubServer) CreateAttribute(context.Context, *CreateAttributeRequest) (*Attribute, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateAttribute not implemented") } func (UnimplementedApiHubServer) GetAttribute(context.Context, *GetAttributeRequest) (*Attribute, error) { return nil, status.Errorf(codes.Unimplemented, "method GetAttribute not implemented") } func (UnimplementedApiHubServer) UpdateAttribute(context.Context, *UpdateAttributeRequest) (*Attribute, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateAttribute not implemented") } func (UnimplementedApiHubServer) DeleteAttribute(context.Context, *DeleteAttributeRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteAttribute not implemented") } func (UnimplementedApiHubServer) ListAttributes(context.Context, *ListAttributesRequest) (*ListAttributesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListAttributes not implemented") } func (UnimplementedApiHubServer) SearchResources(context.Context, *SearchResourcesRequest) (*SearchResourcesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SearchResources not implemented") } func (UnimplementedApiHubServer) CreateExternalApi(context.Context, *CreateExternalApiRequest) (*ExternalApi, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateExternalApi not implemented") } func (UnimplementedApiHubServer) GetExternalApi(context.Context, *GetExternalApiRequest) (*ExternalApi, error) { return nil, status.Errorf(codes.Unimplemented, "method GetExternalApi not implemented") } func (UnimplementedApiHubServer) UpdateExternalApi(context.Context, *UpdateExternalApiRequest) (*ExternalApi, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateExternalApi not implemented") } func (UnimplementedApiHubServer) DeleteExternalApi(context.Context, *DeleteExternalApiRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteExternalApi not implemented") } func (UnimplementedApiHubServer) ListExternalApis(context.Context, *ListExternalApisRequest) (*ListExternalApisResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListExternalApis not implemented") } // UnsafeApiHubServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ApiHubServer will // result in compilation errors. type UnsafeApiHubServer interface { mustEmbedUnimplementedApiHubServer() } func RegisterApiHubServer(s grpc.ServiceRegistrar, srv ApiHubServer) { s.RegisterService(&ApiHub_ServiceDesc, srv) } func _ApiHub_CreateApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateApi(ctx, req.(*CreateApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetApi(ctx, req.(*GetApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListApis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListApisRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListApis(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListApis_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListApis(ctx, req.(*ListApisRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateApi(ctx, req.(*UpdateApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteApi(ctx, req.(*DeleteApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateVersion(ctx, req.(*CreateVersionRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetVersion(ctx, req.(*GetVersionRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListVersions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListVersionsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListVersions(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListVersions_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListVersions(ctx, req.(*ListVersionsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateVersion(ctx, req.(*UpdateVersionRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteVersionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteVersion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteVersion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteVersion(ctx, req.(*DeleteVersionRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateSpecRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateSpec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateSpec_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateSpec(ctx, req.(*CreateSpecRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSpecRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetSpec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetSpec_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetSpec(ctx, req.(*GetSpecRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetSpecContents_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetSpecContentsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetSpecContents(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetSpecContents_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetSpecContents(ctx, req.(*GetSpecContentsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListSpecs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListSpecsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListSpecs(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListSpecs_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListSpecs(ctx, req.(*ListSpecsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateSpecRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateSpec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateSpec_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateSpec(ctx, req.(*UpdateSpecRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteSpec_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteSpecRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteSpec(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteSpec_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteSpec(ctx, req.(*DeleteSpecRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateApiOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateApiOperationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateApiOperation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateApiOperation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateApiOperation(ctx, req.(*CreateApiOperationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetApiOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetApiOperationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetApiOperation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetApiOperation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetApiOperation(ctx, req.(*GetApiOperationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListApiOperations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListApiOperationsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListApiOperations(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListApiOperations_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListApiOperations(ctx, req.(*ListApiOperationsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateApiOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateApiOperationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateApiOperation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateApiOperation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateApiOperation(ctx, req.(*UpdateApiOperationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteApiOperation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteApiOperationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteApiOperation(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteApiOperation_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteApiOperation(ctx, req.(*DeleteApiOperationRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetDefinition_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDefinitionRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetDefinition(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetDefinition_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetDefinition(ctx, req.(*GetDefinitionRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateDeploymentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateDeployment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateDeployment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateDeployment(ctx, req.(*CreateDeploymentRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDeploymentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetDeployment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetDeployment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetDeployment(ctx, req.(*GetDeploymentRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListDeployments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListDeploymentsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListDeployments(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListDeployments_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListDeployments(ctx, req.(*ListDeploymentsRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateDeploymentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateDeployment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateDeployment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateDeployment(ctx, req.(*UpdateDeploymentRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteDeployment_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteDeploymentRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteDeployment(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteDeployment_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteDeployment(ctx, req.(*DeleteDeploymentRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateAttribute(ctx, req.(*CreateAttributeRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetAttribute(ctx, req.(*GetAttributeRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateAttribute(ctx, req.(*UpdateAttributeRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteAttribute_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteAttributeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteAttribute(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteAttribute_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteAttribute(ctx, req.(*DeleteAttributeRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListAttributesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListAttributes(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListAttributes_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListAttributes(ctx, req.(*ListAttributesRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_SearchResources_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SearchResourcesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).SearchResources(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_SearchResources_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).SearchResources(ctx, req.(*SearchResourcesRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_CreateExternalApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateExternalApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).CreateExternalApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_CreateExternalApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).CreateExternalApi(ctx, req.(*CreateExternalApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_GetExternalApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetExternalApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).GetExternalApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_GetExternalApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).GetExternalApi(ctx, req.(*GetExternalApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_UpdateExternalApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateExternalApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).UpdateExternalApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_UpdateExternalApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).UpdateExternalApi(ctx, req.(*UpdateExternalApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_DeleteExternalApi_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteExternalApiRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).DeleteExternalApi(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_DeleteExternalApi_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).DeleteExternalApi(ctx, req.(*DeleteExternalApiRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHub_ListExternalApis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListExternalApisRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubServer).ListExternalApis(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHub_ListExternalApis_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubServer).ListExternalApis(ctx, req.(*ListExternalApisRequest)) } return interceptor(ctx, in, info, handler) } // ApiHub_ServiceDesc is the grpc.ServiceDesc for ApiHub service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ApiHub_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.apihub.v1.ApiHub", HandlerType: (*ApiHubServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateApi", Handler: _ApiHub_CreateApi_Handler, }, { MethodName: "GetApi", Handler: _ApiHub_GetApi_Handler, }, { MethodName: "ListApis", Handler: _ApiHub_ListApis_Handler, }, { MethodName: "UpdateApi", Handler: _ApiHub_UpdateApi_Handler, }, { MethodName: "DeleteApi", Handler: _ApiHub_DeleteApi_Handler, }, { MethodName: "CreateVersion", Handler: _ApiHub_CreateVersion_Handler, }, { MethodName: "GetVersion", Handler: _ApiHub_GetVersion_Handler, }, { MethodName: "ListVersions", Handler: _ApiHub_ListVersions_Handler, }, { MethodName: "UpdateVersion", Handler: _ApiHub_UpdateVersion_Handler, }, { MethodName: "DeleteVersion", Handler: _ApiHub_DeleteVersion_Handler, }, { MethodName: "CreateSpec", Handler: _ApiHub_CreateSpec_Handler, }, { MethodName: "GetSpec", Handler: _ApiHub_GetSpec_Handler, }, { MethodName: "GetSpecContents", Handler: _ApiHub_GetSpecContents_Handler, }, { MethodName: "ListSpecs", Handler: _ApiHub_ListSpecs_Handler, }, { MethodName: "UpdateSpec", Handler: _ApiHub_UpdateSpec_Handler, }, { MethodName: "DeleteSpec", Handler: _ApiHub_DeleteSpec_Handler, }, { MethodName: "CreateApiOperation", Handler: _ApiHub_CreateApiOperation_Handler, }, { MethodName: "GetApiOperation", Handler: _ApiHub_GetApiOperation_Handler, }, { MethodName: "ListApiOperations", Handler: _ApiHub_ListApiOperations_Handler, }, { MethodName: "UpdateApiOperation", Handler: _ApiHub_UpdateApiOperation_Handler, }, { MethodName: "DeleteApiOperation", Handler: _ApiHub_DeleteApiOperation_Handler, }, { MethodName: "GetDefinition", Handler: _ApiHub_GetDefinition_Handler, }, { MethodName: "CreateDeployment", Handler: _ApiHub_CreateDeployment_Handler, }, { MethodName: "GetDeployment", Handler: _ApiHub_GetDeployment_Handler, }, { MethodName: "ListDeployments", Handler: _ApiHub_ListDeployments_Handler, }, { MethodName: "UpdateDeployment", Handler: _ApiHub_UpdateDeployment_Handler, }, { MethodName: "DeleteDeployment", Handler: _ApiHub_DeleteDeployment_Handler, }, { MethodName: "CreateAttribute", Handler: _ApiHub_CreateAttribute_Handler, }, { MethodName: "GetAttribute", Handler: _ApiHub_GetAttribute_Handler, }, { MethodName: "UpdateAttribute", Handler: _ApiHub_UpdateAttribute_Handler, }, { MethodName: "DeleteAttribute", Handler: _ApiHub_DeleteAttribute_Handler, }, { MethodName: "ListAttributes", Handler: _ApiHub_ListAttributes_Handler, }, { MethodName: "SearchResources", Handler: _ApiHub_SearchResources_Handler, }, { MethodName: "CreateExternalApi", Handler: _ApiHub_CreateExternalApi_Handler, }, { MethodName: "GetExternalApi", Handler: _ApiHub_GetExternalApi_Handler, }, { MethodName: "UpdateExternalApi", Handler: _ApiHub_UpdateExternalApi_Handler, }, { MethodName: "DeleteExternalApi", Handler: _ApiHub_DeleteExternalApi_Handler, }, { MethodName: "ListExternalApis", Handler: _ApiHub_ListExternalApis_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/apihub/v1/apihub_service.proto", } const ( ApiHubDependencies_CreateDependency_FullMethodName = "/google.cloud.apihub.v1.ApiHubDependencies/CreateDependency" ApiHubDependencies_GetDependency_FullMethodName = "/google.cloud.apihub.v1.ApiHubDependencies/GetDependency" ApiHubDependencies_UpdateDependency_FullMethodName = "/google.cloud.apihub.v1.ApiHubDependencies/UpdateDependency" ApiHubDependencies_DeleteDependency_FullMethodName = "/google.cloud.apihub.v1.ApiHubDependencies/DeleteDependency" ApiHubDependencies_ListDependencies_FullMethodName = "/google.cloud.apihub.v1.ApiHubDependencies/ListDependencies" ) // ApiHubDependenciesClient is the client API for ApiHubDependencies service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type ApiHubDependenciesClient interface { // Create a dependency between two entities in the API hub. CreateDependency(ctx context.Context, in *CreateDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) // Get details about a dependency resource in the API hub. GetDependency(ctx context.Context, in *GetDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) // Update a dependency based on the // [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] // provided in the request. // // The following fields in the [dependency][google.cloud.apihub.v1.Dependency] // can be updated: // * [description][google.cloud.apihub.v1.Dependency.description] UpdateDependency(ctx context.Context, in *UpdateDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) // Delete the dependency resource. DeleteDependency(ctx context.Context, in *DeleteDependencyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // List dependencies based on the provided filter and pagination parameters. ListDependencies(ctx context.Context, in *ListDependenciesRequest, opts ...grpc.CallOption) (*ListDependenciesResponse, error) } type apiHubDependenciesClient struct { cc grpc.ClientConnInterface } func NewApiHubDependenciesClient(cc grpc.ClientConnInterface) ApiHubDependenciesClient { return &apiHubDependenciesClient{cc} } func (c *apiHubDependenciesClient) CreateDependency(ctx context.Context, in *CreateDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) { out := new(Dependency) err := c.cc.Invoke(ctx, ApiHubDependencies_CreateDependency_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubDependenciesClient) GetDependency(ctx context.Context, in *GetDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) { out := new(Dependency) err := c.cc.Invoke(ctx, ApiHubDependencies_GetDependency_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubDependenciesClient) UpdateDependency(ctx context.Context, in *UpdateDependencyRequest, opts ...grpc.CallOption) (*Dependency, error) { out := new(Dependency) err := c.cc.Invoke(ctx, ApiHubDependencies_UpdateDependency_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubDependenciesClient) DeleteDependency(ctx context.Context, in *DeleteDependencyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, ApiHubDependencies_DeleteDependency_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *apiHubDependenciesClient) ListDependencies(ctx context.Context, in *ListDependenciesRequest, opts ...grpc.CallOption) (*ListDependenciesResponse, error) { out := new(ListDependenciesResponse) err := c.cc.Invoke(ctx, ApiHubDependencies_ListDependencies_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // ApiHubDependenciesServer is the server API for ApiHubDependencies service. // All implementations should embed UnimplementedApiHubDependenciesServer // for forward compatibility type ApiHubDependenciesServer interface { // Create a dependency between two entities in the API hub. CreateDependency(context.Context, *CreateDependencyRequest) (*Dependency, error) // Get details about a dependency resource in the API hub. GetDependency(context.Context, *GetDependencyRequest) (*Dependency, error) // Update a dependency based on the // [update_mask][google.cloud.apihub.v1.UpdateDependencyRequest.update_mask] // provided in the request. // // The following fields in the [dependency][google.cloud.apihub.v1.Dependency] // can be updated: // * [description][google.cloud.apihub.v1.Dependency.description] UpdateDependency(context.Context, *UpdateDependencyRequest) (*Dependency, error) // Delete the dependency resource. DeleteDependency(context.Context, *DeleteDependencyRequest) (*emptypb.Empty, error) // List dependencies based on the provided filter and pagination parameters. ListDependencies(context.Context, *ListDependenciesRequest) (*ListDependenciesResponse, error) } // UnimplementedApiHubDependenciesServer should be embedded to have forward compatible implementations. type UnimplementedApiHubDependenciesServer struct { } func (UnimplementedApiHubDependenciesServer) CreateDependency(context.Context, *CreateDependencyRequest) (*Dependency, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateDependency not implemented") } func (UnimplementedApiHubDependenciesServer) GetDependency(context.Context, *GetDependencyRequest) (*Dependency, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDependency not implemented") } func (UnimplementedApiHubDependenciesServer) UpdateDependency(context.Context, *UpdateDependencyRequest) (*Dependency, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateDependency not implemented") } func (UnimplementedApiHubDependenciesServer) DeleteDependency(context.Context, *DeleteDependencyRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteDependency not implemented") } func (UnimplementedApiHubDependenciesServer) ListDependencies(context.Context, *ListDependenciesRequest) (*ListDependenciesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListDependencies not implemented") } // UnsafeApiHubDependenciesServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ApiHubDependenciesServer will // result in compilation errors. type UnsafeApiHubDependenciesServer interface { mustEmbedUnimplementedApiHubDependenciesServer() } func RegisterApiHubDependenciesServer(s grpc.ServiceRegistrar, srv ApiHubDependenciesServer) { s.RegisterService(&ApiHubDependencies_ServiceDesc, srv) } func _ApiHubDependencies_CreateDependency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateDependencyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubDependenciesServer).CreateDependency(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubDependencies_CreateDependency_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubDependenciesServer).CreateDependency(ctx, req.(*CreateDependencyRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubDependencies_GetDependency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetDependencyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubDependenciesServer).GetDependency(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubDependencies_GetDependency_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubDependenciesServer).GetDependency(ctx, req.(*GetDependencyRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubDependencies_UpdateDependency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateDependencyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubDependenciesServer).UpdateDependency(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubDependencies_UpdateDependency_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubDependenciesServer).UpdateDependency(ctx, req.(*UpdateDependencyRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubDependencies_DeleteDependency_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteDependencyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubDependenciesServer).DeleteDependency(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubDependencies_DeleteDependency_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubDependenciesServer).DeleteDependency(ctx, req.(*DeleteDependencyRequest)) } return interceptor(ctx, in, info, handler) } func _ApiHubDependencies_ListDependencies_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListDependenciesRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ApiHubDependenciesServer).ListDependencies(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: ApiHubDependencies_ListDependencies_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiHubDependenciesServer).ListDependencies(ctx, req.(*ListDependenciesRequest)) } return interceptor(ctx, in, info, handler) } // ApiHubDependencies_ServiceDesc is the grpc.ServiceDesc for ApiHubDependencies service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var ApiHubDependencies_ServiceDesc = grpc.ServiceDesc{ ServiceName: "google.cloud.apihub.v1.ApiHubDependencies", HandlerType: (*ApiHubDependenciesServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateDependency", Handler: _ApiHubDependencies_CreateDependency_Handler, }, { MethodName: "GetDependency", Handler: _ApiHubDependencies_GetDependency_Handler, }, { MethodName: "UpdateDependency", Handler: _ApiHubDependencies_UpdateDependency_Handler, }, { MethodName: "DeleteDependency", Handler: _ApiHubDependencies_DeleteDependency_Handler, }, { MethodName: "ListDependencies", Handler: _ApiHubDependencies_ListDependencies_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "google/cloud/apihub/v1/apihub_service.proto", }