Class protos.google.cloud.compute.v1.ResourcePolicy (4.1.0)

Represents a ResourcePolicy.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.compute.v1.IResourcePolicy);

Constructs a new ResourcePolicy.

Parameter
NameDescription
properties IResourcePolicy

Properties to set

Properties

_creationTimestamp

public _creationTimestamp?: "creationTimestamp";

ResourcePolicy _creationTimestamp.

_description

public _description?: "description";

ResourcePolicy _description.

_diskConsistencyGroupPolicy

public _diskConsistencyGroupPolicy?: "diskConsistencyGroupPolicy";

ResourcePolicy _diskConsistencyGroupPolicy.

_groupPlacementPolicy

public _groupPlacementPolicy?: "groupPlacementPolicy";

ResourcePolicy _groupPlacementPolicy.

_id

public _id?: "id";

ResourcePolicy _id.

_instanceSchedulePolicy

public _instanceSchedulePolicy?: "instanceSchedulePolicy";

ResourcePolicy _instanceSchedulePolicy.

_kind

public _kind?: "kind";

ResourcePolicy _kind.

_name

public _name?: "name";

ResourcePolicy _name.

_region

public _region?: "region";

ResourcePolicy _region.

_resourceStatus

public _resourceStatus?: "resourceStatus";

ResourcePolicy _resourceStatus.

public _selfLink?: "selfLink";

ResourcePolicy _selfLink.

_snapshotSchedulePolicy

public _snapshotSchedulePolicy?: "snapshotSchedulePolicy";

ResourcePolicy _snapshotSchedulePolicy.

_status

public _status?: "status";

ResourcePolicy _status.

creationTimestamp

public creationTimestamp?: (string|null);

ResourcePolicy creationTimestamp.

description

public description?: (string|null);

ResourcePolicy description.

diskConsistencyGroupPolicy

public diskConsistencyGroupPolicy?: (google.cloud.compute.v1.IResourcePolicyDiskConsistencyGroupPolicy|null);

ResourcePolicy diskConsistencyGroupPolicy.

groupPlacementPolicy

public groupPlacementPolicy?: (google.cloud.compute.v1.IResourcePolicyGroupPlacementPolicy|null);

ResourcePolicy groupPlacementPolicy.

id

public id?: (number|Long|string|null);

ResourcePolicy id.

instanceSchedulePolicy

public instanceSchedulePolicy?: (google.cloud.compute.v1.IResourcePolicyInstanceSchedulePolicy|null);

ResourcePolicy instanceSchedulePolicy.

kind

public kind?: (string|null);

ResourcePolicy kind.

name

public name?: (string|null);

ResourcePolicy name.

region

public region?: (string|null);

ResourcePolicy region.

resourceStatus

public resourceStatus?: (google.cloud.compute.v1.IResourcePolicyResourceStatus|null);

ResourcePolicy resourceStatus.

public selfLink?: (string|null);

ResourcePolicy selfLink.

snapshotSchedulePolicy

public snapshotSchedulePolicy?: (google.cloud.compute.v1.IResourcePolicySnapshotSchedulePolicy|null);

ResourcePolicy snapshotSchedulePolicy.

status

public status?: (string|null);

ResourcePolicy status.

Methods

create(properties)

public static create(properties?: google.cloud.compute.v1.IResourcePolicy): google.cloud.compute.v1.ResourcePolicy;

Creates a new ResourcePolicy instance using the specified properties.

Parameter
NameDescription
properties IResourcePolicy

Properties to set

Returns
TypeDescription
ResourcePolicy

ResourcePolicy instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.compute.v1.ResourcePolicy;

Decodes a ResourcePolicy 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
ResourcePolicy

ResourcePolicy

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.compute.v1.ResourcePolicy;

Decodes a ResourcePolicy message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
ResourcePolicy

ResourcePolicy

encode(message, writer)

public static encode(message: google.cloud.compute.v1.IResourcePolicy, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified ResourcePolicy message. Does not implicitly messages.

Parameters
NameDescription
message IResourcePolicy

ResourcePolicy 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.cloud.compute.v1.IResourcePolicy, writer?: $protobuf.Writer): $protobuf.Writer;

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

Parameters
NameDescription
message IResourcePolicy

ResourcePolicy 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.cloud.compute.v1.ResourcePolicy;

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

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

Plain object

Returns
TypeDescription
ResourcePolicy

ResourcePolicy

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for ResourcePolicy

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 ResourcePolicy to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.compute.v1.ResourcePolicy, options?: $protobuf.IConversionOptions): { [k: string]: any };

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

Parameters
NameDescription
message ResourcePolicy

ResourcePolicy

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

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

Verifies a ResourcePolicy 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