Class protos.google.cloud.compute.v1.SecurityPolicyRule (4.5.0)

Represents a SecurityPolicyRule.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new SecurityPolicyRule.

Parameter
Name Description
properties ISecurityPolicyRule

Properties to set

Properties

_action

public _action?: "action";

SecurityPolicyRule _action.

_description

public _description?: "description";

SecurityPolicyRule _description.

_headerAction

public _headerAction?: "headerAction";

SecurityPolicyRule _headerAction.

_kind

public _kind?: "kind";

SecurityPolicyRule _kind.

_match

public _match?: "match";

SecurityPolicyRule _match.

_networkMatch

public _networkMatch?: "networkMatch";

SecurityPolicyRule _networkMatch.

_preconfiguredWafConfig

public _preconfiguredWafConfig?: "preconfiguredWafConfig";

SecurityPolicyRule _preconfiguredWafConfig.

_preview

public _preview?: "preview";

SecurityPolicyRule _preview.

_priority

public _priority?: "priority";

SecurityPolicyRule _priority.

_rateLimitOptions

public _rateLimitOptions?: "rateLimitOptions";

SecurityPolicyRule _rateLimitOptions.

_redirectOptions

public _redirectOptions?: "redirectOptions";

SecurityPolicyRule _redirectOptions.

action

public action?: (string|null);

SecurityPolicyRule action.

description

public description?: (string|null);

SecurityPolicyRule description.

headerAction

public headerAction?: (google.cloud.compute.v1.ISecurityPolicyRuleHttpHeaderAction|null);

SecurityPolicyRule headerAction.

kind

public kind?: (string|null);

SecurityPolicyRule kind.

match

public match?: (google.cloud.compute.v1.ISecurityPolicyRuleMatcher|null);

SecurityPolicyRule match.

networkMatch

public networkMatch?: (google.cloud.compute.v1.ISecurityPolicyRuleNetworkMatcher|null);

SecurityPolicyRule networkMatch.

preconfiguredWafConfig

public preconfiguredWafConfig?: (google.cloud.compute.v1.ISecurityPolicyRulePreconfiguredWafConfig|null);

SecurityPolicyRule preconfiguredWafConfig.

preview

public preview?: (boolean|null);

SecurityPolicyRule preview.

priority

public priority?: (number|null);

SecurityPolicyRule priority.

rateLimitOptions

public rateLimitOptions?: (google.cloud.compute.v1.ISecurityPolicyRuleRateLimitOptions|null);

SecurityPolicyRule rateLimitOptions.

redirectOptions

public redirectOptions?: (google.cloud.compute.v1.ISecurityPolicyRuleRedirectOptions|null);

SecurityPolicyRule redirectOptions.

Methods

create(properties)

public static create(properties?: google.cloud.compute.v1.ISecurityPolicyRule): google.cloud.compute.v1.SecurityPolicyRule;

Creates a new SecurityPolicyRule instance using the specified properties.

Parameter
Name Description
properties ISecurityPolicyRule

Properties to set

Returns
Type Description
SecurityPolicyRule

SecurityPolicyRule instance

decode(reader, length)

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

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

SecurityPolicyRule

decodeDelimited(reader)

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

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

Parameter
Name Description
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
Type Description
SecurityPolicyRule

SecurityPolicyRule

encode(message, writer)

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

Encodes the specified SecurityPolicyRule message. Does not implicitly messages.

Parameters
Name Description
message ISecurityPolicyRule

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

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

Parameters
Name Description
message ISecurityPolicyRule

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

Creates a SecurityPolicyRule 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
SecurityPolicyRule

SecurityPolicyRule

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for SecurityPolicyRule

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

Returns
Type Description
{ [k: string]: any }

JSON object

toObject(message, options)

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

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

Parameters
Name Description
message SecurityPolicyRule

SecurityPolicyRule

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 SecurityPolicyRule message.

Parameter
Name Description
message { [k: string]: any }

Plain object to verify

Returns
Type Description
(string|null)

null if valid, otherwise the reason why it is not