Class protos.google.rpc.context.AttributeContext (3.2.0)

Represents an AttributeContext.

Package

@google-cloud/service-control

Constructors

(constructor)(properties)

constructor(properties?: google.rpc.context.IAttributeContext);

Constructs a new AttributeContext.

Parameter
NameDescription
properties IAttributeContext

Properties to set

Properties

api

public api?: (google.rpc.context.AttributeContext.IApi|null);

AttributeContext api.

destination

public destination?: (google.rpc.context.AttributeContext.IPeer|null);

AttributeContext destination.

extensions

public extensions: google.protobuf.IAny[];

AttributeContext extensions.

origin

public origin?: (google.rpc.context.AttributeContext.IPeer|null);

AttributeContext origin.

request

public request?: (google.rpc.context.AttributeContext.IRequest|null);

AttributeContext request.

resource

public resource?: (google.rpc.context.AttributeContext.IResource|null);

AttributeContext resource.

response

public response?: (google.rpc.context.AttributeContext.IResponse|null);

AttributeContext response.

source

public source?: (google.rpc.context.AttributeContext.IPeer|null);

AttributeContext source.

Methods

create(properties)

public static create(properties?: google.rpc.context.IAttributeContext): google.rpc.context.AttributeContext;

Creates a new AttributeContext instance using the specified properties.

Parameter
NameDescription
properties IAttributeContext

Properties to set

Returns
TypeDescription
AttributeContext

AttributeContext instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.rpc.context.AttributeContext;

Decodes an AttributeContext message from the specified reader or buffer.

Parameters
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
AttributeContext

AttributeContext

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.rpc.context.AttributeContext;

Decodes an AttributeContext message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
AttributeContext

AttributeContext

encode(message, writer)

public static encode(message: google.rpc.context.IAttributeContext, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified AttributeContext message. Does not implicitly messages.

Parameters
NameDescription
message IAttributeContext

AttributeContext message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.rpc.context.IAttributeContext, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified AttributeContext message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message IAttributeContext

AttributeContext message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.rpc.context.AttributeContext;

Creates an AttributeContext message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
AttributeContext

AttributeContext

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for AttributeContext

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this AttributeContext to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.rpc.context.AttributeContext, options?: $protobuf.IConversionOptions): { [k: string]: any };

Creates a plain object from an AttributeContext message. Also converts values to other types if specified.

Parameters
NameDescription
message AttributeContext

AttributeContext

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies an AttributeContext message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not