Represents a ResourcePolicy.
Package
@google-cloud/computeConstructors
(constructor)(properties)
constructor(properties?: google.cloud.compute.v1.IResourcePolicy);
Constructs a new ResourcePolicy.
Parameter | |
---|---|
Name | Description |
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.
_selfLink
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.
selfLink
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 | |
---|---|
Name | Description |
properties |
IResourcePolicy
Properties to set |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
message |
IResourcePolicy
ResourcePolicy message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
message |
IResourcePolicy
ResourcePolicy message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$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 | |
---|---|
Name | Description |
object |
{ [k: string]: any }
Plain object |
Returns | |
---|---|
Type | Description |
ResourcePolicy | ResourcePolicy |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;
Gets the default type url for ResourcePolicy
Parameter | |
---|---|
Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
Returns | |
---|---|
Type | Description |
string | The default type url |
toJSON()
public toJSON(): { [k: string]: any };
Converts this ResourcePolicy to JSON.
Returns | |
---|---|
Type | Description |
{ [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 | |
---|---|
Name | Description |
message |
ResourcePolicy
ResourcePolicy |
options |
$protobuf.IConversionOptions
Conversion options |
Returns | |
---|---|
Type | Description |
{ [k: string]: any } | Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies a ResourcePolicy message.
Parameter | |
---|---|
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Returns | |
---|---|
Type | Description |
(string|null) |
|