Close httplib2 connections.
create(parent, body=None, schemaId=None, x__xgafv=None)
Creates a schema.
Deletes a schema.
get(name, view=None, x__xgafv=None)
Gets a schema.
list(parent, pageSize=None, pageToken=None, view=None, x__xgafv=None)
Lists schemas in a project.
list_next(previous_request, previous_response)
Retrieves the next page of results.
validate(parent, body=None, x__xgafv=None)
Validates a schema.
validateMessage(parent, body=None, x__xgafv=None)
Validates a message against a schema.
close()
Close httplib2 connections.
create(parent, body=None, schemaId=None, x__xgafv=None)
Creates a schema.
Args:
parent: string, Required. The name of the project in which to create the schema. Format is `projects/{project-id}`. (required)
body: object, The request body.
The object takes the form of:
{ # A schema resource.
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
}
schemaId: string, The ID to use for the schema, which will become the final component of the schema's resource name. See https://cloud.google.com/pubsub/docs/admin#resource_names for resource name constraints.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A schema resource.
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
}
delete(name, x__xgafv=None)
Deletes a schema.
Args:
name: string, Required. Name of the schema to delete. Format is `projects/{project}/schemas/{schema}`. (required)
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
}
get(name, view=None, x__xgafv=None)
Gets a schema.
Args:
name: string, Required. The name of the schema to get. Format is `projects/{project}/schemas/{schema}`. (required)
view: string, The set of fields to return in the response. If not set, returns a Schema with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.
Allowed values
SCHEMA_VIEW_UNSPECIFIED - The default / unset value. The API will default to the BASIC view.
BASIC - Include the name and type of the schema, but not the definition.
FULL - Include all Schema object fields.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # A schema resource.
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
}
list(parent, pageSize=None, pageToken=None, view=None, x__xgafv=None)
Lists schemas in a project.
Args:
parent: string, Required. The name of the project in which to list schemas. Format is `projects/{project-id}`. (required)
pageSize: integer, Maximum number of schemas to return.
pageToken: string, The value returned by the last `ListSchemasResponse`; indicates that this is a continuation of a prior `ListSchemas` call, and that the system should return the next page of data.
view: string, The set of Schema fields to return in the response. If not set, returns Schemas with `name` and `type`, but not `definition`. Set to `FULL` to retrieve all fields.
Allowed values
SCHEMA_VIEW_UNSPECIFIED - The default / unset value. The API will default to the BASIC view.
BASIC - Include the name and type of the schema, but not the definition.
FULL - Include all Schema object fields.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for the `ListSchemas` method.
"nextPageToken": "A String", # If not empty, indicates that there may be more schemas that match the request; this value should be passed in a new `ListSchemasRequest`.
"schemas": [ # The resulting schemas.
{ # A schema resource.
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
},
],
}
list_next(previous_request, previous_response)
Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call 'execute()' on to request the next
page. Returns None if there are no more items in the collection.
validate(parent, body=None, x__xgafv=None)
Validates a schema.
Args:
parent: string, Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `ValidateSchema` method.
"schema": { # A schema resource. # Required. The schema object to validate.
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for the `ValidateSchema` method. Empty for now.
}
validateMessage(parent, body=None, x__xgafv=None)
Validates a message against a schema.
Args:
parent: string, Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`. (required)
body: object, The request body.
The object takes the form of:
{ # Request for the `ValidateMessage` method.
"encoding": "A String", # The encoding expected for messages
"message": "A String", # Message to validate against the provided `schema_spec`.
"name": "A String", # Name of the schema against which to validate. Format is `projects/{project}/schemas/{schema}`.
"schema": { # A schema resource. # Ad-hoc schema against which to validate
"definition": "A String", # The definition of the schema. This should contain a string representing the full definition of the schema that is a valid schema definition of the type specified in `type`.
"name": "A String", # Required. Name of the schema. Format is `projects/{project}/schemas/{schema}`.
"type": "A String", # The type of the schema definition.
},
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # Response for the `ValidateMessage` method. Empty for now.
}