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

Represents a SecurityPolicyRule.

Package

@google-cloud/compute

Constructors

(constructor)(properties)

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

Constructs a new SecurityPolicyRule.

Parameter
NameDescription
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
NameDescription
properties ISecurityPolicyRule

Properties to set

Returns
TypeDescription
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
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
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
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
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
NameDescription
message ISecurityPolicyRule

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

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

Parameters
NameDescription
message ISecurityPolicyRule

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

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

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

Plain object

Returns
TypeDescription
SecurityPolicyRule

SecurityPolicyRule

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for SecurityPolicyRule

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

Returns
TypeDescription
{ [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
NameDescription
message SecurityPolicyRule

SecurityPolicyRule

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