
com.google.cloud.compute.v1.FirewallPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-compute-v1 Show documentation
Show all versions of proto-google-cloud-compute-v1 Show documentation
Proto library for google-cloud-compute
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/compute/v1/compute.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.compute.v1;
/**
*
*
*
* Represents a Firewall Policy resource.
*
*
* Protobuf type {@code google.cloud.compute.v1.FirewallPolicy}
*/
public final class FirewallPolicy extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.FirewallPolicy)
FirewallPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use FirewallPolicy.newBuilder() to construct.
private FirewallPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FirewallPolicy() {
associations_ = java.util.Collections.emptyList();
creationTimestamp_ = "";
description_ = "";
displayName_ = "";
fingerprint_ = "";
kind_ = "";
name_ = "";
parent_ = "";
region_ = "";
rules_ = java.util.Collections.emptyList();
selfLink_ = "";
selfLinkWithId_ = "";
shortName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new FirewallPolicy();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_FirewallPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.FirewallPolicy.class,
com.google.cloud.compute.v1.FirewallPolicy.Builder.class);
}
private int bitField0_;
public static final int ASSOCIATIONS_FIELD_NUMBER = 508736530;
@SuppressWarnings("serial")
private java.util.List associations_;
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
@java.lang.Override
public java.util.List
getAssociationsList() {
return associations_;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>
getAssociationsOrBuilderList() {
return associations_;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
@java.lang.Override
public int getAssociationsCount() {
return associations_.size();
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicyAssociation getAssociations(int index) {
return associations_.get(index);
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder getAssociationsOrBuilder(
int index) {
return associations_.get(index);
}
public static final int CREATION_TIMESTAMP_FIELD_NUMBER = 30525366;
@SuppressWarnings("serial")
private volatile java.lang.Object creationTimestamp_ = "";
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
@java.lang.Override
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
@java.lang.Override
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
creationTimestamp_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
@java.lang.Override
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 422937596;
@SuppressWarnings("serial")
private volatile java.lang.Object description_ = "";
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
@java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DISPLAY_NAME_FIELD_NUMBER = 4473832;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return Whether the displayName field is set.
*/
@java.lang.Override
public boolean hasDisplayName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
}
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FINGERPRINT_FIELD_NUMBER = 234678500;
@SuppressWarnings("serial")
private volatile java.lang.Object fingerprint_ = "";
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return Whether the fingerprint field is set.
*/
@java.lang.Override
public boolean hasFingerprint() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return The fingerprint.
*/
@java.lang.Override
public java.lang.String getFingerprint() {
java.lang.Object ref = fingerprint_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fingerprint_ = s;
return s;
}
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return The bytes for fingerprint.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFingerprintBytes() {
java.lang.Object ref = fingerprint_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fingerprint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 3355;
private long id_ = 0L;
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
public static final int KIND_FIELD_NUMBER = 3292052;
@SuppressWarnings("serial")
private volatile java.lang.Object kind_ = "";
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
@java.lang.Override
public boolean hasKind() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return The kind.
*/
@java.lang.Override
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kind_ = s;
return s;
}
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return The bytes for kind.
*/
@java.lang.Override
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NAME_FIELD_NUMBER = 3373707;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PARENT_FIELD_NUMBER = 78317738;
@SuppressWarnings("serial")
private volatile java.lang.Object parent_ = "";
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return Whether the parent field is set.
*/
@java.lang.Override
public boolean hasParent() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return The parent.
*/
@java.lang.Override
public java.lang.String getParent() {
java.lang.Object ref = parent_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parent_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return The bytes for parent.
*/
@java.lang.Override
public com.google.protobuf.ByteString getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int REGION_FIELD_NUMBER = 138946292;
@SuppressWarnings("serial")
private volatile java.lang.Object region_ = "";
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
@java.lang.Override
public boolean hasRegion() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return The region.
*/
@java.lang.Override
public java.lang.String getRegion() {
java.lang.Object ref = region_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
region_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return The bytes for region.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RULE_TUPLE_COUNT_FIELD_NUMBER = 388342037;
private int ruleTupleCount_ = 0;
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @return Whether the ruleTupleCount field is set.
*/
@java.lang.Override
public boolean hasRuleTupleCount() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @return The ruleTupleCount.
*/
@java.lang.Override
public int getRuleTupleCount() {
return ruleTupleCount_;
}
public static final int RULES_FIELD_NUMBER = 108873975;
@SuppressWarnings("serial")
private java.util.List rules_;
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
@java.lang.Override
public java.util.List getRulesList() {
return rules_;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
@java.lang.Override
public java.util.List extends com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>
getRulesOrBuilderList() {
return rules_;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
@java.lang.Override
public int getRulesCount() {
return rules_.size();
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicyRule getRules(int index) {
return rules_.get(index);
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder getRulesOrBuilder(int index) {
return rules_.get(index);
}
public static final int SELF_LINK_FIELD_NUMBER = 456214797;
@SuppressWarnings("serial")
private volatile java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
@java.lang.Override
public boolean hasSelfLink() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
@java.lang.Override
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLink_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SELF_LINK_WITH_ID_FIELD_NUMBER = 44520962;
@SuppressWarnings("serial")
private volatile java.lang.Object selfLinkWithId_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return Whether the selfLinkWithId field is set.
*/
@java.lang.Override
public boolean hasSelfLinkWithId() {
return ((bitField0_ & 0x00000800) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return The selfLinkWithId.
*/
@java.lang.Override
public java.lang.String getSelfLinkWithId() {
java.lang.Object ref = selfLinkWithId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLinkWithId_ = s;
return s;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return The bytes for selfLinkWithId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getSelfLinkWithIdBytes() {
java.lang.Object ref = selfLinkWithId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLinkWithId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SHORT_NAME_FIELD_NUMBER = 492051566;
@SuppressWarnings("serial")
private volatile java.lang.Object shortName_ = "";
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return Whether the shortName field is set.
*/
@java.lang.Override
public boolean hasShortName() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return The shortName.
*/
@java.lang.Override
public java.lang.String getShortName() {
java.lang.Object ref = shortName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortName_ = s;
return s;
}
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return The bytes for shortName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getShortNameBytes() {
java.lang.Object ref = shortName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (((bitField0_ & 0x00000010) != 0)) {
output.writeUInt64(3355, id_);
}
if (((bitField0_ & 0x00000020) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3292052, kind_);
}
if (((bitField0_ & 0x00000040) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4473832, displayName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000800) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 44520962, selfLinkWithId_);
}
if (((bitField0_ & 0x00000080) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 78317738, parent_);
}
for (int i = 0; i < rules_.size(); i++) {
output.writeMessage(108873975, rules_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 138946292, region_);
}
if (((bitField0_ & 0x00000008) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 234678500, fingerprint_);
}
if (((bitField0_ & 0x00000200) != 0)) {
output.writeInt32(388342037, ruleTupleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 422937596, description_);
}
if (((bitField0_ & 0x00000400) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 456214797, selfLink_);
}
if (((bitField0_ & 0x00001000) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 492051566, shortName_);
}
for (int i = 0; i < associations_.size(); i++) {
output.writeMessage(508736530, associations_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeUInt64Size(3355, id_);
}
if (((bitField0_ & 0x00000020) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3292052, kind_);
}
if (((bitField0_ & 0x00000040) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4473832, displayName_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size +=
com.google.protobuf.GeneratedMessageV3.computeStringSize(30525366, creationTimestamp_);
}
if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(44520962, selfLinkWithId_);
}
if (((bitField0_ & 0x00000080) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(78317738, parent_);
}
for (int i = 0; i < rules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(108873975, rules_.get(i));
}
if (((bitField0_ & 0x00000100) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(138946292, region_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(234678500, fingerprint_);
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(388342037, ruleTupleCount_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(422937596, description_);
}
if (((bitField0_ & 0x00000400) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(456214797, selfLink_);
}
if (((bitField0_ & 0x00001000) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(492051566, shortName_);
}
for (int i = 0; i < associations_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(508736530, associations_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.compute.v1.FirewallPolicy)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.FirewallPolicy other =
(com.google.cloud.compute.v1.FirewallPolicy) obj;
if (!getAssociationsList().equals(other.getAssociationsList())) return false;
if (hasCreationTimestamp() != other.hasCreationTimestamp()) return false;
if (hasCreationTimestamp()) {
if (!getCreationTimestamp().equals(other.getCreationTimestamp())) return false;
}
if (hasDescription() != other.hasDescription()) return false;
if (hasDescription()) {
if (!getDescription().equals(other.getDescription())) return false;
}
if (hasDisplayName() != other.hasDisplayName()) return false;
if (hasDisplayName()) {
if (!getDisplayName().equals(other.getDisplayName())) return false;
}
if (hasFingerprint() != other.hasFingerprint()) return false;
if (hasFingerprint()) {
if (!getFingerprint().equals(other.getFingerprint())) return false;
}
if (hasId() != other.hasId()) return false;
if (hasId()) {
if (getId() != other.getId()) return false;
}
if (hasKind() != other.hasKind()) return false;
if (hasKind()) {
if (!getKind().equals(other.getKind())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName().equals(other.getName())) return false;
}
if (hasParent() != other.hasParent()) return false;
if (hasParent()) {
if (!getParent().equals(other.getParent())) return false;
}
if (hasRegion() != other.hasRegion()) return false;
if (hasRegion()) {
if (!getRegion().equals(other.getRegion())) return false;
}
if (hasRuleTupleCount() != other.hasRuleTupleCount()) return false;
if (hasRuleTupleCount()) {
if (getRuleTupleCount() != other.getRuleTupleCount()) return false;
}
if (!getRulesList().equals(other.getRulesList())) return false;
if (hasSelfLink() != other.hasSelfLink()) return false;
if (hasSelfLink()) {
if (!getSelfLink().equals(other.getSelfLink())) return false;
}
if (hasSelfLinkWithId() != other.hasSelfLinkWithId()) return false;
if (hasSelfLinkWithId()) {
if (!getSelfLinkWithId().equals(other.getSelfLinkWithId())) return false;
}
if (hasShortName() != other.hasShortName()) return false;
if (hasShortName()) {
if (!getShortName().equals(other.getShortName())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getAssociationsCount() > 0) {
hash = (37 * hash) + ASSOCIATIONS_FIELD_NUMBER;
hash = (53 * hash) + getAssociationsList().hashCode();
}
if (hasCreationTimestamp()) {
hash = (37 * hash) + CREATION_TIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getCreationTimestamp().hashCode();
}
if (hasDescription()) {
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
}
if (hasDisplayName()) {
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
}
if (hasFingerprint()) {
hash = (37 * hash) + FINGERPRINT_FIELD_NUMBER;
hash = (53 * hash) + getFingerprint().hashCode();
}
if (hasId()) {
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getId());
}
if (hasKind()) {
hash = (37 * hash) + KIND_FIELD_NUMBER;
hash = (53 * hash) + getKind().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasParent()) {
hash = (37 * hash) + PARENT_FIELD_NUMBER;
hash = (53 * hash) + getParent().hashCode();
}
if (hasRegion()) {
hash = (37 * hash) + REGION_FIELD_NUMBER;
hash = (53 * hash) + getRegion().hashCode();
}
if (hasRuleTupleCount()) {
hash = (37 * hash) + RULE_TUPLE_COUNT_FIELD_NUMBER;
hash = (53 * hash) + getRuleTupleCount();
}
if (getRulesCount() > 0) {
hash = (37 * hash) + RULES_FIELD_NUMBER;
hash = (53 * hash) + getRulesList().hashCode();
}
if (hasSelfLink()) {
hash = (37 * hash) + SELF_LINK_FIELD_NUMBER;
hash = (53 * hash) + getSelfLink().hashCode();
}
if (hasSelfLinkWithId()) {
hash = (37 * hash) + SELF_LINK_WITH_ID_FIELD_NUMBER;
hash = (53 * hash) + getSelfLinkWithId().hashCode();
}
if (hasShortName()) {
hash = (37 * hash) + SHORT_NAME_FIELD_NUMBER;
hash = (53 * hash) + getShortName().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.FirewallPolicy parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.compute.v1.FirewallPolicy prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents a Firewall Policy resource.
*
*
* Protobuf type {@code google.cloud.compute.v1.FirewallPolicy}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.FirewallPolicy)
com.google.cloud.compute.v1.FirewallPolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_FirewallPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.FirewallPolicy.class,
com.google.cloud.compute.v1.FirewallPolicy.Builder.class);
}
// Construct using com.google.cloud.compute.v1.FirewallPolicy.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (associationsBuilder_ == null) {
associations_ = java.util.Collections.emptyList();
} else {
associations_ = null;
associationsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
creationTimestamp_ = "";
description_ = "";
displayName_ = "";
fingerprint_ = "";
id_ = 0L;
kind_ = "";
name_ = "";
parent_ = "";
region_ = "";
ruleTupleCount_ = 0;
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
} else {
rules_ = null;
rulesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000800);
selfLink_ = "";
selfLinkWithId_ = "";
shortName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_FirewallPolicy_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicy getDefaultInstanceForType() {
return com.google.cloud.compute.v1.FirewallPolicy.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicy build() {
com.google.cloud.compute.v1.FirewallPolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicy buildPartial() {
com.google.cloud.compute.v1.FirewallPolicy result =
new com.google.cloud.compute.v1.FirewallPolicy(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.compute.v1.FirewallPolicy result) {
if (associationsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
associations_ = java.util.Collections.unmodifiableList(associations_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.associations_ = associations_;
} else {
result.associations_ = associationsBuilder_.build();
}
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
bitField0_ = (bitField0_ & ~0x00000800);
}
result.rules_ = rules_;
} else {
result.rules_ = rulesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.compute.v1.FirewallPolicy result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.creationTimestamp_ = creationTimestamp_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.description_ = description_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.displayName_ = displayName_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.fingerprint_ = fingerprint_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.kind_ = kind_;
to_bitField0_ |= 0x00000020;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000040;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.parent_ = parent_;
to_bitField0_ |= 0x00000080;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.region_ = region_;
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.ruleTupleCount_ = ruleTupleCount_;
to_bitField0_ |= 0x00000200;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.selfLink_ = selfLink_;
to_bitField0_ |= 0x00000400;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.selfLinkWithId_ = selfLinkWithId_;
to_bitField0_ |= 0x00000800;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.shortName_ = shortName_;
to_bitField0_ |= 0x00001000;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.compute.v1.FirewallPolicy) {
return mergeFrom((com.google.cloud.compute.v1.FirewallPolicy) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.FirewallPolicy other) {
if (other == com.google.cloud.compute.v1.FirewallPolicy.getDefaultInstance()) return this;
if (associationsBuilder_ == null) {
if (!other.associations_.isEmpty()) {
if (associations_.isEmpty()) {
associations_ = other.associations_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureAssociationsIsMutable();
associations_.addAll(other.associations_);
}
onChanged();
}
} else {
if (!other.associations_.isEmpty()) {
if (associationsBuilder_.isEmpty()) {
associationsBuilder_.dispose();
associationsBuilder_ = null;
associations_ = other.associations_;
bitField0_ = (bitField0_ & ~0x00000001);
associationsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getAssociationsFieldBuilder()
: null;
} else {
associationsBuilder_.addAllMessages(other.associations_);
}
}
}
if (other.hasCreationTimestamp()) {
creationTimestamp_ = other.creationTimestamp_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasDescription()) {
description_ = other.description_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasDisplayName()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000008;
onChanged();
}
if (other.hasFingerprint()) {
fingerprint_ = other.fingerprint_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasId()) {
setId(other.getId());
}
if (other.hasKind()) {
kind_ = other.kind_;
bitField0_ |= 0x00000040;
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.hasParent()) {
parent_ = other.parent_;
bitField0_ |= 0x00000100;
onChanged();
}
if (other.hasRegion()) {
region_ = other.region_;
bitField0_ |= 0x00000200;
onChanged();
}
if (other.hasRuleTupleCount()) {
setRuleTupleCount(other.getRuleTupleCount());
}
if (rulesBuilder_ == null) {
if (!other.rules_.isEmpty()) {
if (rules_.isEmpty()) {
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureRulesIsMutable();
rules_.addAll(other.rules_);
}
onChanged();
}
} else {
if (!other.rules_.isEmpty()) {
if (rulesBuilder_.isEmpty()) {
rulesBuilder_.dispose();
rulesBuilder_ = null;
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000800);
rulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getRulesFieldBuilder()
: null;
} else {
rulesBuilder_.addAllMessages(other.rules_);
}
}
}
if (other.hasSelfLink()) {
selfLink_ = other.selfLink_;
bitField0_ |= 0x00001000;
onChanged();
}
if (other.hasSelfLinkWithId()) {
selfLinkWithId_ = other.selfLinkWithId_;
bitField0_ |= 0x00002000;
onChanged();
}
if (other.hasShortName()) {
shortName_ = other.shortName_;
bitField0_ |= 0x00004000;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 26840:
{
id_ = input.readUInt64();
bitField0_ |= 0x00000020;
break;
} // case 26840
case 26336418:
{
kind_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000040;
break;
} // case 26336418
case 26989658:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 26989658
case 35790658:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 35790658
case 244202930:
{
creationTimestamp_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 244202930
case 356167698:
{
selfLinkWithId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00002000;
break;
} // case 356167698
case 626541906:
{
parent_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 626541906
case 870991802:
{
com.google.cloud.compute.v1.FirewallPolicyRule m =
input.readMessage(
com.google.cloud.compute.v1.FirewallPolicyRule.parser(), extensionRegistry);
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(m);
} else {
rulesBuilder_.addMessage(m);
}
break;
} // case 870991802
case 1111570338:
{
region_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000200;
break;
} // case 1111570338
case 1877428002:
{
fingerprint_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 1877428002
case -1188231000:
{
ruleTupleCount_ = input.readInt32();
bitField0_ |= 0x00000400;
break;
} // case -1188231000
case -911466526:
{
description_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case -911466526
case -645248918:
{
selfLink_ = input.readStringRequireUtf8();
bitField0_ |= 0x00001000;
break;
} // case -645248918
case -358554766:
{
shortName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00004000;
break;
} // case -358554766
case -225075054:
{
com.google.cloud.compute.v1.FirewallPolicyAssociation m =
input.readMessage(
com.google.cloud.compute.v1.FirewallPolicyAssociation.parser(),
extensionRegistry);
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
associations_.add(m);
} else {
associationsBuilder_.addMessage(m);
}
break;
} // case -225075054
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List associations_ =
java.util.Collections.emptyList();
private void ensureAssociationsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
associations_ =
new java.util.ArrayList(
associations_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyAssociation,
com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder,
com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>
associationsBuilder_;
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public java.util.List
getAssociationsList() {
if (associationsBuilder_ == null) {
return java.util.Collections.unmodifiableList(associations_);
} else {
return associationsBuilder_.getMessageList();
}
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public int getAssociationsCount() {
if (associationsBuilder_ == null) {
return associations_.size();
} else {
return associationsBuilder_.getCount();
}
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public com.google.cloud.compute.v1.FirewallPolicyAssociation getAssociations(int index) {
if (associationsBuilder_ == null) {
return associations_.get(index);
} else {
return associationsBuilder_.getMessage(index);
}
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder setAssociations(
int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value) {
if (associationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssociationsIsMutable();
associations_.set(index, value);
onChanged();
} else {
associationsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder setAssociations(
int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) {
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
associations_.set(index, builderForValue.build());
onChanged();
} else {
associationsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder addAssociations(com.google.cloud.compute.v1.FirewallPolicyAssociation value) {
if (associationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssociationsIsMutable();
associations_.add(value);
onChanged();
} else {
associationsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder addAssociations(
int index, com.google.cloud.compute.v1.FirewallPolicyAssociation value) {
if (associationsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureAssociationsIsMutable();
associations_.add(index, value);
onChanged();
} else {
associationsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder addAssociations(
com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) {
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
associations_.add(builderForValue.build());
onChanged();
} else {
associationsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder addAssociations(
int index, com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder builderForValue) {
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
associations_.add(index, builderForValue.build());
onChanged();
} else {
associationsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder addAllAssociations(
java.lang.Iterable extends com.google.cloud.compute.v1.FirewallPolicyAssociation>
values) {
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, associations_);
onChanged();
} else {
associationsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder clearAssociations() {
if (associationsBuilder_ == null) {
associations_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
associationsBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public Builder removeAssociations(int index) {
if (associationsBuilder_ == null) {
ensureAssociationsIsMutable();
associations_.remove(index);
onChanged();
} else {
associationsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder getAssociationsBuilder(
int index) {
return getAssociationsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder getAssociationsOrBuilder(
int index) {
if (associationsBuilder_ == null) {
return associations_.get(index);
} else {
return associationsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public java.util.List extends com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>
getAssociationsOrBuilderList() {
if (associationsBuilder_ != null) {
return associationsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(associations_);
}
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder addAssociationsBuilder() {
return getAssociationsFieldBuilder()
.addBuilder(com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance());
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder addAssociationsBuilder(
int index) {
return getAssociationsFieldBuilder()
.addBuilder(
index, com.google.cloud.compute.v1.FirewallPolicyAssociation.getDefaultInstance());
}
/**
*
*
*
* A list of associations that belong to this firewall policy.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyAssociation associations = 508736530;
*
*/
public java.util.List
getAssociationsBuilderList() {
return getAssociationsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyAssociation,
com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder,
com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>
getAssociationsFieldBuilder() {
if (associationsBuilder_ == null) {
associationsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyAssociation,
com.google.cloud.compute.v1.FirewallPolicyAssociation.Builder,
com.google.cloud.compute.v1.FirewallPolicyAssociationOrBuilder>(
associations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
associations_ = null;
}
return associationsBuilder_;
}
private java.lang.Object creationTimestamp_ = "";
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return Whether the creationTimestamp field is set.
*/
public boolean hasCreationTimestamp() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The creationTimestamp.
*/
public java.lang.String getCreationTimestamp() {
java.lang.Object ref = creationTimestamp_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
creationTimestamp_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return The bytes for creationTimestamp.
*/
public com.google.protobuf.ByteString getCreationTimestampBytes() {
java.lang.Object ref = creationTimestamp_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
creationTimestamp_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestamp(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
creationTimestamp_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @return This builder for chaining.
*/
public Builder clearCreationTimestamp() {
creationTimestamp_ = getDefaultInstance().getCreationTimestamp();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Creation timestamp in RFC3339 text format.
*
*
* optional string creation_timestamp = 30525366;
*
* @param value The bytes for creationTimestamp to set.
* @return This builder for chaining.
*/
public Builder setCreationTimestampBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
creationTimestamp_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return Whether the description field is set.
*/
public boolean hasDescription() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return The bytes for description.
*/
public com.google.protobuf.ByteString getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* An optional description of this resource. Provide this property when you create the resource.
*
*
* optional string description = 422937596;
*
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return Whether the displayName field is set.
*/
public boolean hasDisplayName() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
*
*
* Deprecated, please use short name instead. User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string display_name = 4473832;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object fingerprint_ = "";
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return Whether the fingerprint field is set.
*/
public boolean hasFingerprint() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return The fingerprint.
*/
public java.lang.String getFingerprint() {
java.lang.Object ref = fingerprint_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fingerprint_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return The bytes for fingerprint.
*/
public com.google.protobuf.ByteString getFingerprintBytes() {
java.lang.Object ref = fingerprint_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
fingerprint_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @param value The fingerprint to set.
* @return This builder for chaining.
*/
public Builder setFingerprint(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
fingerprint_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @return This builder for chaining.
*/
public Builder clearFingerprint() {
fingerprint_ = getDefaultInstance().getFingerprint();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* Specifies a fingerprint for this resource, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata, otherwise the request will fail with error 412 conditionNotMet. To see the latest fingerprint, make get() request to the firewall policy.
*
*
* optional string fingerprint = 234678500;
*
* @param value The bytes for fingerprint to set.
* @return This builder for chaining.
*/
public Builder setFingerprintBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
fingerprint_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private long id_;
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return Whether the id field is set.
*/
@java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return The id.
*/
@java.lang.Override
public long getId() {
return id_;
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(long value) {
id_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The unique identifier for the resource. This identifier is defined by the server.
*
*
* optional uint64 id = 3355;
*
* @return This builder for chaining.
*/
public Builder clearId() {
bitField0_ = (bitField0_ & ~0x00000020);
id_ = 0L;
onChanged();
return this;
}
private java.lang.Object kind_ = "";
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return Whether the kind field is set.
*/
public boolean hasKind() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return The kind.
*/
public java.lang.String getKind() {
java.lang.Object ref = kind_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
kind_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return The bytes for kind.
*/
public com.google.protobuf.ByteString getKindBytes() {
java.lang.Object ref = kind_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
kind_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @param value The kind to set.
* @return This builder for chaining.
*/
public Builder setKind(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
kind_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @return This builder for chaining.
*/
public Builder clearKind() {
kind_ = getDefaultInstance().getKind();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
return this;
}
/**
*
*
*
* [Output only] Type of the resource. Always compute#firewallPolicyfor firewall policies
*
*
* optional string kind = 3292052;
*
* @param value The bytes for kind to set.
* @return This builder for chaining.
*/
public Builder setKindBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
kind_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* Name of the resource. For Organization Firewall Policies it's a [Output Only] numeric ID allocated by Google Cloud which uniquely identifies the Organization Firewall Policy.
*
*
* optional string name = 3373707;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private java.lang.Object parent_ = "";
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return Whether the parent field is set.
*/
public boolean hasParent() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return The parent.
*/
public java.lang.String getParent() {
java.lang.Object ref = parent_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
parent_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return The bytes for parent.
*/
public com.google.protobuf.ByteString getParentBytes() {
java.lang.Object ref = parent_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
parent_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @param value The parent to set.
* @return This builder for chaining.
*/
public Builder setParent(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
parent_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @return This builder for chaining.
*/
public Builder clearParent() {
parent_ = getDefaultInstance().getParent();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] The parent of the firewall policy. This field is not applicable to network firewall policies.
*
*
* optional string parent = 78317738;
*
* @param value The bytes for parent to set.
* @return This builder for chaining.
*/
public Builder setParentBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
parent_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
private java.lang.Object region_ = "";
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return Whether the region field is set.
*/
public boolean hasRegion() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return The region.
*/
public java.lang.String getRegion() {
java.lang.Object ref = region_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
region_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return The bytes for region.
*/
public com.google.protobuf.ByteString getRegionBytes() {
java.lang.Object ref = region_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
region_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @param value The region to set.
* @return This builder for chaining.
*/
public Builder setRegion(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
region_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @return This builder for chaining.
*/
public Builder clearRegion() {
region_ = getDefaultInstance().getRegion();
bitField0_ = (bitField0_ & ~0x00000200);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] URL of the region where the regional firewall policy resides. This field is not applicable to global firewall policies. You must specify this field as part of the HTTP request URL. It is not settable as a field in the request body.
*
*
* optional string region = 138946292;
*
* @param value The bytes for region to set.
* @return This builder for chaining.
*/
public Builder setRegionBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
region_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
private int ruleTupleCount_;
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @return Whether the ruleTupleCount field is set.
*/
@java.lang.Override
public boolean hasRuleTupleCount() {
return ((bitField0_ & 0x00000400) != 0);
}
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @return The ruleTupleCount.
*/
@java.lang.Override
public int getRuleTupleCount() {
return ruleTupleCount_;
}
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @param value The ruleTupleCount to set.
* @return This builder for chaining.
*/
public Builder setRuleTupleCount(int value) {
ruleTupleCount_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Total count of all firewall policy rule tuples. A firewall policy can not exceed a set number of tuples.
*
*
* optional int32 rule_tuple_count = 388342037;
*
* @return This builder for chaining.
*/
public Builder clearRuleTupleCount() {
bitField0_ = (bitField0_ & ~0x00000400);
ruleTupleCount_ = 0;
onChanged();
return this;
}
private java.util.List rules_ =
java.util.Collections.emptyList();
private void ensureRulesIsMutable() {
if (!((bitField0_ & 0x00000800) != 0)) {
rules_ = new java.util.ArrayList(rules_);
bitField0_ |= 0x00000800;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyRule,
com.google.cloud.compute.v1.FirewallPolicyRule.Builder,
com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>
rulesBuilder_;
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public java.util.List getRulesList() {
if (rulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(rules_);
} else {
return rulesBuilder_.getMessageList();
}
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public int getRulesCount() {
if (rulesBuilder_ == null) {
return rules_.size();
} else {
return rulesBuilder_.getCount();
}
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public com.google.cloud.compute.v1.FirewallPolicyRule getRules(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessage(index);
}
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder setRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.set(index, value);
onChanged();
} else {
rulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder setRules(
int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.set(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder addRules(com.google.cloud.compute.v1.FirewallPolicyRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(value);
onChanged();
} else {
rulesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder addRules(int index, com.google.cloud.compute.v1.FirewallPolicyRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(index, value);
onChanged();
} else {
rulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder addRules(
com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder addRules(
int index, com.google.cloud.compute.v1.FirewallPolicyRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder addAllRules(
java.lang.Iterable extends com.google.cloud.compute.v1.FirewallPolicyRule> values) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rules_);
onChanged();
} else {
rulesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder clearRules() {
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
} else {
rulesBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public Builder removeRules(int index) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.remove(index);
onChanged();
} else {
rulesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public com.google.cloud.compute.v1.FirewallPolicyRule.Builder getRulesBuilder(int index) {
return getRulesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder getRulesOrBuilder(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public java.util.List extends com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>
getRulesOrBuilderList() {
if (rulesBuilder_ != null) {
return rulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rules_);
}
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public com.google.cloud.compute.v1.FirewallPolicyRule.Builder addRulesBuilder() {
return getRulesFieldBuilder()
.addBuilder(com.google.cloud.compute.v1.FirewallPolicyRule.getDefaultInstance());
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public com.google.cloud.compute.v1.FirewallPolicyRule.Builder addRulesBuilder(int index) {
return getRulesFieldBuilder()
.addBuilder(index, com.google.cloud.compute.v1.FirewallPolicyRule.getDefaultInstance());
}
/**
*
*
*
* A list of rules that belong to this policy. There must always be a default rule (rule with priority 2147483647 and match "*"). If no rules are provided when creating a firewall policy, a default rule with action "allow" will be added.
*
*
* repeated .google.cloud.compute.v1.FirewallPolicyRule rules = 108873975;
*/
public java.util.List
getRulesBuilderList() {
return getRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyRule,
com.google.cloud.compute.v1.FirewallPolicyRule.Builder,
com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>
getRulesFieldBuilder() {
if (rulesBuilder_ == null) {
rulesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.compute.v1.FirewallPolicyRule,
com.google.cloud.compute.v1.FirewallPolicyRule.Builder,
com.google.cloud.compute.v1.FirewallPolicyRuleOrBuilder>(
rules_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean());
rules_ = null;
}
return rulesBuilder_;
}
private java.lang.Object selfLink_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return Whether the selfLink field is set.
*/
public boolean hasSelfLink() {
return ((bitField0_ & 0x00001000) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The selfLink.
*/
public java.lang.String getSelfLink() {
java.lang.Object ref = selfLink_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLink_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return The bytes for selfLink.
*/
public com.google.protobuf.ByteString getSelfLinkBytes() {
java.lang.Object ref = selfLink_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLink_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @param value The selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLink(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
selfLink_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @return This builder for chaining.
*/
public Builder clearSelfLink() {
selfLink_ = getDefaultInstance().getSelfLink();
bitField0_ = (bitField0_ & ~0x00001000);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for the resource.
*
*
* optional string self_link = 456214797;
*
* @param value The bytes for selfLink to set.
* @return This builder for chaining.
*/
public Builder setSelfLinkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
selfLink_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
private java.lang.Object selfLinkWithId_ = "";
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return Whether the selfLinkWithId field is set.
*/
public boolean hasSelfLinkWithId() {
return ((bitField0_ & 0x00002000) != 0);
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return The selfLinkWithId.
*/
public java.lang.String getSelfLinkWithId() {
java.lang.Object ref = selfLinkWithId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
selfLinkWithId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return The bytes for selfLinkWithId.
*/
public com.google.protobuf.ByteString getSelfLinkWithIdBytes() {
java.lang.Object ref = selfLinkWithId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
selfLinkWithId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @param value The selfLinkWithId to set.
* @return This builder for chaining.
*/
public Builder setSelfLinkWithId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
selfLinkWithId_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @return This builder for chaining.
*/
public Builder clearSelfLinkWithId() {
selfLinkWithId_ = getDefaultInstance().getSelfLinkWithId();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
return this;
}
/**
*
*
*
* [Output Only] Server-defined URL for this resource with the resource id.
*
*
* optional string self_link_with_id = 44520962;
*
* @param value The bytes for selfLinkWithId to set.
* @return This builder for chaining.
*/
public Builder setSelfLinkWithIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
selfLinkWithId_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
private java.lang.Object shortName_ = "";
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return Whether the shortName field is set.
*/
public boolean hasShortName() {
return ((bitField0_ & 0x00004000) != 0);
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return The shortName.
*/
public java.lang.String getShortName() {
java.lang.Object ref = shortName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
shortName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return The bytes for shortName.
*/
public com.google.protobuf.ByteString getShortNameBytes() {
java.lang.Object ref = shortName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
shortName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @param value The shortName to set.
* @return This builder for chaining.
*/
public Builder setShortName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
shortName_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @return This builder for chaining.
*/
public Builder clearShortName() {
shortName_ = getDefaultInstance().getShortName();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
return this;
}
/**
*
*
*
* User-provided name of the Organization firewall policy. The name should be unique in the organization in which the firewall policy is created. This field is not applicable to network firewall policies. This name must be set on creation and cannot be changed. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.
*
*
* optional string short_name = 492051566;
*
* @param value The bytes for shortName to set.
* @return This builder for chaining.
*/
public Builder setShortNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
shortName_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.compute.v1.FirewallPolicy)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.FirewallPolicy)
private static final com.google.cloud.compute.v1.FirewallPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.FirewallPolicy();
}
public static com.google.cloud.compute.v1.FirewallPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FirewallPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.compute.v1.FirewallPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy