Class protos.google.cloud.compute.v1.SecurityPolicy

Represents a SecurityPolicy.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new SecurityPolicy.

Parameter
NameDescription
properties ISecurityPolicy

Properties to set

Properties

_adaptiveProtectionConfig

public _adaptiveProtectionConfig?: "adaptiveProtectionConfig";

SecurityPolicy _adaptiveProtectionConfig.

_advancedOptionsConfig

public _advancedOptionsConfig?: "advancedOptionsConfig";

SecurityPolicy _advancedOptionsConfig.

_creationTimestamp

public _creationTimestamp?: "creationTimestamp";

SecurityPolicy _creationTimestamp.

_description

public _description?: "description";

SecurityPolicy _description.

_fingerprint

public _fingerprint?: "fingerprint";

SecurityPolicy _fingerprint.

_id

public _id?: "id";

SecurityPolicy _id.

_kind

public _kind?: "kind";

SecurityPolicy _kind.

_name

public _name?: "name";

SecurityPolicy _name.

public _selfLink?: "selfLink";

SecurityPolicy _selfLink.

adaptiveProtectionConfig

public adaptiveProtectionConfig?: (google.cloud.compute.v1.ISecurityPolicyAdaptiveProtectionConfig|null);

SecurityPolicy adaptiveProtectionConfig.

advancedOptionsConfig

public advancedOptionsConfig?: (google.cloud.compute.v1.ISecurityPolicyAdvancedOptionsConfig|null);

SecurityPolicy advancedOptionsConfig.

creationTimestamp

public creationTimestamp?: (string|null);

SecurityPolicy creationTimestamp.

description

public description?: (string|null);

SecurityPolicy description.

fingerprint

public fingerprint?: (string|null);

SecurityPolicy fingerprint.

id

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

SecurityPolicy id.

kind

public kind?: (string|null);

SecurityPolicy kind.

name

public name?: (string|null);

SecurityPolicy name.

rules

public rules: google.cloud.compute.v1.ISecurityPolicyRule[];

SecurityPolicy rules.

public selfLink?: (string|null);

SecurityPolicy selfLink.

Methods

create(properties)

public static create(properties?: google.cloud.compute.v1.ISecurityPolicy): google.cloud.compute.v1.SecurityPolicy;

Creates a new SecurityPolicy instance using the specified properties.

Parameter
NameDescription
properties ISecurityPolicy

Properties to set

Returns
TypeDescription
google.cloud.compute.v1.SecurityPolicy

SecurityPolicy instance

decode(reader, length)

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

Decodes a SecurityPolicy message from the specified reader or buffer.

Parameters
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
google.cloud.compute.v1.SecurityPolicy

SecurityPolicy

decodeDelimited(reader)

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

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

Parameter
NameDescription
reader ($protobuf.Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
google.cloud.compute.v1.SecurityPolicy

SecurityPolicy

encode(message, writer)

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

Encodes the specified SecurityPolicy message. Does not implicitly messages.

Parameters
NameDescription
message ISecurityPolicy

SecurityPolicy 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.ISecurityPolicy, writer?: $protobuf.Writer): $protobuf.Writer;

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

Parameters
NameDescription
message ISecurityPolicy

SecurityPolicy 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.SecurityPolicy;

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

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

Plain object

Returns
TypeDescription
google.cloud.compute.v1.SecurityPolicy

SecurityPolicy

toJSON()

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

Converts this SecurityPolicy to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

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

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

Parameters
NameDescription
message google.cloud.compute.v1.SecurityPolicy

SecurityPolicy

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 SecurityPolicy 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