class ProjectsSchemas extends Resource (View source)

The "schemas" collection of methods.

Typical usage is:

 $pubsubService = new Google\Service\Pubsub(...);
 $schemas = $pubsubService->projects_schemas;

Methods

commit(string $name, CommitSchemaRequest $postBody, array $optParams = [])

Commits a new schema revision to an existing schema. (schemas.commit)

create(string $parent, Schema $postBody, array $optParams = [])

Creates a schema. (schemas.create)

delete(string $name, array $optParams = [])

Deletes a schema. (schemas.delete)

deleteRevision(string $name, array $optParams = [])

Deletes a specific schema revision. (schemas.deleteRevision)

get(string $name, array $optParams = [])

Gets a schema. (schemas.get)

getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (schemas.getIamPolicy)

listProjectsSchemas(string $parent, array $optParams = [])

Lists schemas in a project. (schemas.listProjectsSchemas)

listRevisions(string $name, array $optParams = [])

Lists all schema revisions for the named schema. (schemas.listRevisions)

rollback(string $name, RollbackSchemaRequest $postBody, array $optParams = [])

Creates a new schema revision that is a copy of the provided revision_id.

setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (schemas.setIamPolicy)

testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

validate(string $parent, ValidateSchemaRequest $postBody, array $optParams = [])

Validates a schema. (schemas.validate)

validateMessage(string $parent, ValidateMessageRequest $postBody, array $optParams = [])

Validates a message against a schema. (schemas.validateMessage)

Details

Schema commit(string $name, CommitSchemaRequest $postBody, array $optParams = [])

Commits a new schema revision to an existing schema. (schemas.commit)

Parameters

string $name

Required. The name of the schema we are revising. Format is projects/{project}/schemas/{schema}.

CommitSchemaRequest $postBody
array $optParams

Optional parameters.

Return Value

Schema

Exceptions

Exception

Schema create(string $parent, Schema $postBody, array $optParams = [])

Creates a schema. (schemas.create)

Parameters

string $parent

Required. The name of the project in which to create the schema. Format is projects/{project-id}.

Schema $postBody
array $optParams

Optional parameters.

Return Value

Schema

Exceptions

Exception

PubsubEmpty delete(string $name, array $optParams = [])

Deletes a schema. (schemas.delete)

Parameters

string $name

Required. Name of the schema to delete. Format is projects/{project}/schemas/{schema}.

array $optParams

Optional parameters.

Return Value

PubsubEmpty

Exceptions

Exception

Schema deleteRevision(string $name, array $optParams = [])

Deletes a specific schema revision. (schemas.deleteRevision)

Parameters

string $name

Required. The name of the schema revision to be deleted, with a revision ID explicitly included. Example: projects/123/schemas/my- schema@c7cfa2a8

array $optParams

Optional parameters.

Return Value

Schema

Exceptions

Exception

Schema get(string $name, array $optParams = [])

Gets a schema. (schemas.get)

Parameters

string $name

Required. The name of the schema to get. Format is projects/{project}/schemas/{schema}.

array $optParams

Optional parameters.

Return Value

Schema

Exceptions

Exception

Policy getIamPolicy(string $resource, array $optParams = [])

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set. (schemas.getIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being requested. See Resource names for the appropriate value for this field.

array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

ListSchemasResponse listProjectsSchemas(string $parent, array $optParams = [])

Lists schemas in a project. (schemas.listProjectsSchemas)

Parameters

string $parent

Required. The name of the project in which to list schemas. Format is projects/{project-id}.

array $optParams

Optional parameters.

Return Value

ListSchemasResponse

Exceptions

Exception

ListSchemaRevisionsResponse listRevisions(string $name, array $optParams = [])

Lists all schema revisions for the named schema. (schemas.listRevisions)

Parameters

string $name

Required. The name of the schema to list revisions for.

array $optParams

Optional parameters.

Return Value

ListSchemaRevisionsResponse

Exceptions

Exception

Schema rollback(string $name, RollbackSchemaRequest $postBody, array $optParams = [])

Creates a new schema revision that is a copy of the provided revision_id.

(schemas.rollback)

Parameters

string $name

Required. The schema being rolled back with revision id.

RollbackSchemaRequest $postBody
array $optParams

Optional parameters.

Return Value

Schema

Exceptions

Exception

Policy setIamPolicy(string $resource, SetIamPolicyRequest $postBody, array $optParams = [])

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors. (schemas.setIamPolicy)

Parameters

string $resource

REQUIRED: The resource for which the policy is being specified. See Resource names for the appropriate value for this field.

SetIamPolicyRequest $postBody
array $optParams

Optional parameters.

Return Value

Policy

Exceptions

Exception

TestIamPermissionsResponse testIamPermissions(string $resource, TestIamPermissionsRequest $postBody, array $optParams = [])

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking.

This operation may "fail open" without warning. (schemas.testIamPermissions)

Parameters

string $resource

REQUIRED: The resource for which the policy detail is being requested. See Resource names for the appropriate value for this field.

TestIamPermissionsRequest $postBody
array $optParams

Optional parameters.

Return Value

TestIamPermissionsResponse

Exceptions

Exception

ValidateSchemaResponse validate(string $parent, ValidateSchemaRequest $postBody, array $optParams = [])

Validates a schema. (schemas.validate)

Parameters

string $parent

Required. The name of the project in which to validate schemas. Format is projects/{project-id}.

ValidateSchemaRequest $postBody
array $optParams

Optional parameters.

Return Value

ValidateSchemaResponse

Exceptions

Exception

ValidateMessageResponse validateMessage(string $parent, ValidateMessageRequest $postBody, array $optParams = [])

Validates a message against a schema. (schemas.validateMessage)

Parameters

string $parent

Required. The name of the project in which to validate schemas. Format is projects/{project-id}.

ValidateMessageRequest $postBody
array $optParams

Optional parameters.

Return Value

ValidateMessageResponse

Exceptions

Exception