com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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;
/**
*
*
*
*
*
* Protobuf type {@code google.cloud.compute.v1.SecurityPolicyUserDefinedField}
*/
public final class SecurityPolicyUserDefinedField extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.compute.v1.SecurityPolicyUserDefinedField)
SecurityPolicyUserDefinedFieldOrBuilder {
private static final long serialVersionUID = 0L;
// Use SecurityPolicyUserDefinedField.newBuilder() to construct.
private SecurityPolicyUserDefinedField(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SecurityPolicyUserDefinedField() {
base_ = "";
mask_ = "";
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new SecurityPolicyUserDefinedField();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_SecurityPolicyUserDefinedField_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_SecurityPolicyUserDefinedField_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.class,
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.Builder.class);
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
*
*
* Protobuf enum {@code google.cloud.compute.v1.SecurityPolicyUserDefinedField.Base}
*/
public enum Base implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_BASE = 0;
*/
UNDEFINED_BASE(0),
/** IPV4 = 2254341;
*/
IPV4(2254341),
/** IPV6 = 2254343;
*/
IPV6(2254343),
/** TCP = 82881;
*/
TCP(82881),
/** UDP = 83873;
*/
UDP(83873),
UNRECOGNIZED(-1),
;
/**
*
*
*
* A value indicating that the enum field is not set.
*
*
* UNDEFINED_BASE = 0;
*/
public static final int UNDEFINED_BASE_VALUE = 0;
/** IPV4 = 2254341;
*/
public static final int IPV4_VALUE = 2254341;
/** IPV6 = 2254343;
*/
public static final int IPV6_VALUE = 2254343;
/** TCP = 82881;
*/
public static final int TCP_VALUE = 82881;
/** UDP = 83873;
*/
public static final int UDP_VALUE = 83873;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static Base valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static Base forNumber(int value) {
switch (value) {
case 0:
return UNDEFINED_BASE;
case 2254341:
return IPV4;
case 2254343:
return IPV6;
case 82881:
return TCP;
case 83873:
return UDP;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap () {
public Base findValueByNumber(int number) {
return Base.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final Base[] VALUES = values();
public static Base valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private Base(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.compute.v1.SecurityPolicyUserDefinedField.Base)
}
private int bitField0_;
public static final int BASE_FIELD_NUMBER = 3016401;
@SuppressWarnings("serial")
private volatile java.lang.Object base_ = "";
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return Whether the base field is set.
*/
@java.lang.Override
public boolean hasBase() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return The base.
*/
@java.lang.Override
public java.lang.String getBase() {
java.lang.Object ref = base_;
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();
base_ = s;
return s;
}
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return The bytes for base.
*/
@java.lang.Override
public com.google.protobuf.ByteString getBaseBytes() {
java.lang.Object ref = base_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
base_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MASK_FIELD_NUMBER = 3344108;
@SuppressWarnings("serial")
private volatile java.lang.Object mask_ = "";
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return Whether the mask field is set.
*/
@java.lang.Override
public boolean hasMask() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return The mask.
*/
@java.lang.Override
public java.lang.String getMask() {
java.lang.Object ref = mask_;
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();
mask_ = s;
return s;
}
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return The bytes for mask.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMaskBytes() {
java.lang.Object ref = mask_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
mask_ = 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_ = "";
/**
*
*
*
* The name of this field. Must be unique within the policy.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
@java.lang.Override
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The name of this field. Must be unique within the 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;
}
}
/**
*
*
*
* The name of this field. Must be unique within the 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 OFFSET_FIELD_NUMBER = 53961875;
private int offset_ = 0;
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @return Whether the offset field is set.
*/
@java.lang.Override
public boolean hasOffset() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @return The offset.
*/
@java.lang.Override
public int getOffset() {
return offset_;
}
public static final int SIZE_FIELD_NUMBER = 3530753;
private int size_ = 0;
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @return Whether the size field is set.
*/
@java.lang.Override
public boolean hasSize() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @return The size.
*/
@java.lang.Override
public int getSize() {
return size_;
}
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_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3016401, base_);
}
if (((bitField0_ & 0x00000002) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3344108, mask_);
}
if (((bitField0_ & 0x00000004) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3373707, name_);
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeInt32(3530753, size_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeInt32(53961875, offset_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3016401, base_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3344108, mask_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3373707, name_);
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3530753, size_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(53961875, offset_);
}
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.SecurityPolicyUserDefinedField)) {
return super.equals(obj);
}
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField other =
(com.google.cloud.compute.v1.SecurityPolicyUserDefinedField) obj;
if (hasBase() != other.hasBase()) return false;
if (hasBase()) {
if (!getBase().equals(other.getBase())) return false;
}
if (hasMask() != other.hasMask()) return false;
if (hasMask()) {
if (!getMask().equals(other.getMask())) return false;
}
if (hasName() != other.hasName()) return false;
if (hasName()) {
if (!getName().equals(other.getName())) return false;
}
if (hasOffset() != other.hasOffset()) return false;
if (hasOffset()) {
if (getOffset() != other.getOffset()) return false;
}
if (hasSize() != other.hasSize()) return false;
if (hasSize()) {
if (getSize() != other.getSize()) 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 (hasBase()) {
hash = (37 * hash) + BASE_FIELD_NUMBER;
hash = (53 * hash) + getBase().hashCode();
}
if (hasMask()) {
hash = (37 * hash) + MASK_FIELD_NUMBER;
hash = (53 * hash) + getMask().hashCode();
}
if (hasName()) {
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
}
if (hasOffset()) {
hash = (37 * hash) + OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getOffset();
}
if (hasSize()) {
hash = (37 * hash) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + getSize();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField 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;
}
/**
*
*
*
*
*
* Protobuf type {@code google.cloud.compute.v1.SecurityPolicyUserDefinedField}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.compute.v1.SecurityPolicyUserDefinedField)
com.google.cloud.compute.v1.SecurityPolicyUserDefinedFieldOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_SecurityPolicyUserDefinedField_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.compute.v1.Compute
.internal_static_google_cloud_compute_v1_SecurityPolicyUserDefinedField_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.class,
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.Builder.class);
}
// Construct using com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
base_ = "";
mask_ = "";
name_ = "";
offset_ = 0;
size_ = 0;
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_SecurityPolicyUserDefinedField_descriptor;
}
@java.lang.Override
public com.google.cloud.compute.v1.SecurityPolicyUserDefinedField getDefaultInstanceForType() {
return com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.compute.v1.SecurityPolicyUserDefinedField build() {
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.compute.v1.SecurityPolicyUserDefinedField buildPartial() {
com.google.cloud.compute.v1.SecurityPolicyUserDefinedField result =
new com.google.cloud.compute.v1.SecurityPolicyUserDefinedField(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.compute.v1.SecurityPolicyUserDefinedField result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.base_ = base_;
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.mask_ = mask_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.name_ = name_;
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.offset_ = offset_;
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.size_ = size_;
to_bitField0_ |= 0x00000010;
}
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.SecurityPolicyUserDefinedField) {
return mergeFrom((com.google.cloud.compute.v1.SecurityPolicyUserDefinedField) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.compute.v1.SecurityPolicyUserDefinedField other) {
if (other == com.google.cloud.compute.v1.SecurityPolicyUserDefinedField.getDefaultInstance())
return this;
if (other.hasBase()) {
base_ = other.base_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasMask()) {
mask_ = other.mask_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasName()) {
name_ = other.name_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasOffset()) {
setOffset(other.getOffset());
}
if (other.hasSize()) {
setSize(other.getSize());
}
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 24131210:
{
base_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 24131210
case 26752866:
{
mask_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 26752866
case 26989658:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26989658
case 28246024:
{
size_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 28246024
case 431695000:
{
offset_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 431695000
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.lang.Object base_ = "";
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return Whether the base field is set.
*/
public boolean hasBase() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return The base.
*/
public java.lang.String getBase() {
java.lang.Object ref = base_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
base_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return The bytes for base.
*/
public com.google.protobuf.ByteString getBaseBytes() {
java.lang.Object ref = base_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
base_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @param value The base to set.
* @return This builder for chaining.
*/
public Builder setBase(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
base_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @return This builder for chaining.
*/
public Builder clearBase() {
base_ = getDefaultInstance().getBase();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The base relative to which 'offset' is measured. Possible values are: - IPV4: Points to the beginning of the IPv4 header. - IPV6: Points to the beginning of the IPv6 header. - TCP: Points to the beginning of the TCP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. - UDP: Points to the beginning of the UDP header, skipping over any IPv4 options or IPv6 extension headers. Not present for non-first fragments. required
* Check the Base enum for the list of possible values.
*
*
* optional string base = 3016401;
*
* @param value The bytes for base to set.
* @return This builder for chaining.
*/
public Builder setBaseBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
base_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object mask_ = "";
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return Whether the mask field is set.
*/
public boolean hasMask() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return The mask.
*/
public java.lang.String getMask() {
java.lang.Object ref = mask_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
mask_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return The bytes for mask.
*/
public com.google.protobuf.ByteString getMaskBytes() {
java.lang.Object ref = mask_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
mask_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @param value The mask to set.
* @return This builder for chaining.
*/
public Builder setMask(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
mask_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @return This builder for chaining.
*/
public Builder clearMask() {
mask_ = getDefaultInstance().getMask();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* If specified, apply this mask (bitwise AND) to the field to ignore bits before matching. Encoded as a hexadecimal number (starting with "0x"). The last byte of the field (in network byte order) corresponds to the least significant byte of the mask.
*
*
* optional string mask = 3344108;
*
* @param value The bytes for mask to set.
* @return This builder for chaining.
*/
public Builder setMaskBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
mask_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*
*
* The name of this field. Must be unique within the policy.
*
*
* optional string name = 3373707;
*
* @return Whether the name field is set.
*/
public boolean hasName() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The name of this field. Must be unique within the 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;
}
}
/**
*
*
*
* The name of this field. Must be unique within the 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;
}
}
/**
*
*
*
* The name of this field. Must be unique within the 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_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The name of this field. Must be unique within the policy.
*
*
* optional string name = 3373707;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* The name of this field. Must be unique within the 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_ |= 0x00000004;
onChanged();
return this;
}
private int offset_;
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @return Whether the offset field is set.
*/
@java.lang.Override
public boolean hasOffset() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @return The offset.
*/
@java.lang.Override
public int getOffset() {
return offset_;
}
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @param value The offset to set.
* @return This builder for chaining.
*/
public Builder setOffset(int value) {
offset_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Offset of the first byte of the field (in network byte order) relative to 'base'.
*
*
* optional int32 offset = 53961875;
*
* @return This builder for chaining.
*/
public Builder clearOffset() {
bitField0_ = (bitField0_ & ~0x00000008);
offset_ = 0;
onChanged();
return this;
}
private int size_;
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @return Whether the size field is set.
*/
@java.lang.Override
public boolean hasSize() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @return The size.
*/
@java.lang.Override
public int getSize() {
return size_;
}
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(int value) {
size_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Size of the field in bytes. Valid values: 1-4.
*
*
* optional int32 size = 3530753;
*
* @return This builder for chaining.
*/
public Builder clearSize() {
bitField0_ = (bitField0_ & ~0x00000010);
size_ = 0;
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.SecurityPolicyUserDefinedField)
}
// @@protoc_insertion_point(class_scope:google.cloud.compute.v1.SecurityPolicyUserDefinedField)
private static final com.google.cloud.compute.v1.SecurityPolicyUserDefinedField DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.compute.v1.SecurityPolicyUserDefinedField();
}
public static com.google.cloud.compute.v1.SecurityPolicyUserDefinedField getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SecurityPolicyUserDefinedField 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.SecurityPolicyUserDefinedField getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy