yandex.cloud.api.vpc.v1.SecurityGroupOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/vpc/v1/security_group.proto
package yandex.cloud.api.vpc.v1;
public final class SecurityGroupOuterClass {
private SecurityGroupOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface SecurityGroupOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.vpc.v1.SecurityGroup)
com.google.protobuf.MessageOrBuilder {
/**
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* string folder_id = 2;
* @return The folderId.
*/
java.lang.String getFolderId();
/**
* string folder_id = 2;
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
boolean hasCreatedAt();
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
com.google.protobuf.Timestamp getCreatedAt();
/**
* .google.protobuf.Timestamp created_at = 3;
*/
com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder();
/**
* string name = 4;
* @return The name.
*/
java.lang.String getName();
/**
* string name = 4;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* string description = 5;
* @return The description.
*/
java.lang.String getDescription();
/**
* string description = 5;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* map<string, string> labels = 6;
*/
int getLabelsCount();
/**
* map<string, string> labels = 6;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
* map<string, string> labels = 6;
*/
java.util.Map
getLabelsMap();
/**
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
* string network_id = 7;
* @return The networkId.
*/
java.lang.String getNetworkId();
/**
* string network_id = 7;
* @return The bytes for networkId.
*/
com.google.protobuf.ByteString
getNetworkIdBytes();
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The status.
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status getStatus();
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
java.util.List
getRulesList();
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getRules(int index);
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
int getRulesCount();
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
java.util.List extends yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder>
getRulesOrBuilderList();
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder getRulesOrBuilder(
int index);
/**
* bool default_for_network = 10;
* @return The defaultForNetwork.
*/
boolean getDefaultForNetwork();
}
/**
* Protobuf type {@code yandex.cloud.vpc.v1.SecurityGroup}
*/
public static final class SecurityGroup extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.vpc.v1.SecurityGroup)
SecurityGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use SecurityGroup.newBuilder() to construct.
private SecurityGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SecurityGroup() {
id_ = "";
folderId_ = "";
name_ = "";
description_ = "";
networkId_ = "";
status_ = 0;
rules_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SecurityGroup();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SecurityGroup(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
networkId_ = s;
break;
}
case 64: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
rules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
rules_.add(
input.readMessage(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.parser(), extensionRegistry));
break;
}
case 80: {
defaultForNetwork_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.vpc.v1.SecurityGroup.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STATUS_UNSPECIFIED = 0;
*/
STATUS_UNSPECIFIED(0),
/**
* CREATING = 1;
*/
CREATING(1),
/**
* ACTIVE = 2;
*/
ACTIVE(2),
/**
*
* updating is a long operation because we must update all instances in SG
*
*
* UPDATING = 3;
*/
UPDATING(3),
/**
* DELETING = 4;
*/
DELETING(4),
UNRECOGNIZED(-1),
;
/**
* STATUS_UNSPECIFIED = 0;
*/
public static final int STATUS_UNSPECIFIED_VALUE = 0;
/**
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
* ACTIVE = 2;
*/
public static final int ACTIVE_VALUE = 2;
/**
*
* updating is a long operation because we must update all instances in SG
*
*
* UPDATING = 3;
*/
public static final int UPDATING_VALUE = 3;
/**
* DELETING = 4;
*/
public static final int DELETING_VALUE = 4;
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 Status 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 Status forNumber(int value) {
switch (value) {
case 0: return STATUS_UNSPECIFIED;
case 1: return CREATING;
case 2: return ACTIVE;
case 3: return UPDATING;
case 4: return DELETING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.vpc.v1.SecurityGroup.Status)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLDER_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object folderId_;
/**
* string folder_id = 2;
* @return The folderId.
*/
@java.lang.Override
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
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();
folderId_ = s;
return s;
}
}
/**
* string folder_id = 2;
* @return The bytes for folderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object name_;
/**
* string name = 4;
* @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;
}
}
/**
* string name = 4;
* @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 DESCRIPTION_FIELD_NUMBER = 5;
private volatile java.lang.Object description_;
/**
* string description = 5;
* @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;
}
}
/**
* string description = 5;
* @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 LABELS_FIELD_NUMBER = 6;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int NETWORK_ID_FIELD_NUMBER = 7;
private volatile java.lang.Object networkId_;
/**
* string network_id = 7;
* @return The networkId.
*/
@java.lang.Override
public java.lang.String getNetworkId() {
java.lang.Object ref = networkId_;
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();
networkId_ = s;
return s;
}
}
/**
* string network_id = 7;
* @return The bytes for networkId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNetworkIdBytes() {
java.lang.Object ref = networkId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
networkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 8;
private int status_;
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status result = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.UNRECOGNIZED : result;
}
public static final int RULES_FIELD_NUMBER = 9;
private java.util.List rules_;
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
@java.lang.Override
public java.util.List getRulesList() {
return rules_;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder>
getRulesOrBuilderList() {
return rules_;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
@java.lang.Override
public int getRulesCount() {
return rules_.size();
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getRules(int index) {
return rules_.get(index);
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder getRulesOrBuilder(
int index) {
return rules_.get(index);
}
public static final int DEFAULT_FOR_NETWORK_FIELD_NUMBER = 10;
private boolean defaultForNetwork_;
/**
* bool default_for_network = 10;
* @return The defaultForNetwork.
*/
@java.lang.Override
public boolean getDefaultForNetwork() {
return defaultForNetwork_;
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, folderId_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
6);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, networkId_);
}
if (status_ != yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(8, status_);
}
for (int i = 0; i < rules_.size(); i++) {
output.writeMessage(9, rules_.get(i));
}
if (defaultForNetwork_ != false) {
output.writeBool(10, defaultForNetwork_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, folderId_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, networkId_);
}
if (status_ != yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, status_);
}
for (int i = 0; i < rules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, rules_.get(i));
}
if (defaultForNetwork_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(10, defaultForNetwork_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup)) {
return super.equals(obj);
}
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup other = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (!getNetworkId()
.equals(other.getNetworkId())) return false;
if (status_ != other.status_) return false;
if (!getRulesList()
.equals(other.getRulesList())) return false;
if (getDefaultForNetwork()
!= other.getDefaultForNetwork()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + NETWORK_ID_FIELD_NUMBER;
hash = (53 * hash) + getNetworkId().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
if (getRulesCount() > 0) {
hash = (37 * hash) + RULES_FIELD_NUMBER;
hash = (53 * hash) + getRulesList().hashCode();
}
hash = (37 * hash) + DEFAULT_FOR_NETWORK_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDefaultForNetwork());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup 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(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup 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 yandex.cloud.vpc.v1.SecurityGroup}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.vpc.v1.SecurityGroup)
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 6:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Builder.class);
}
// Construct using yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
folderId_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
name_ = "";
description_ = "";
internalGetMutableLabels().clear();
networkId_ = "";
status_ = 0;
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
rulesBuilder_.clear();
}
defaultForNetwork_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup getDefaultInstanceForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup build() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup buildPartial() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup result = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.folderId_ = folderId_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
result.name_ = name_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.networkId_ = networkId_;
result.status_ = status_;
if (rulesBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
rules_ = java.util.Collections.unmodifiableList(rules_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.rules_ = rules_;
} else {
result.rules_ = rulesBuilder_.build();
}
result.defaultForNetwork_ = defaultForNetwork_;
onBuilt();
return result;
}
@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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup) {
return mergeFrom((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup other) {
if (other == yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (!other.getNetworkId().isEmpty()) {
networkId_ = other.networkId_;
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (rulesBuilder_ == null) {
if (!other.rules_.isEmpty()) {
if (rules_.isEmpty()) {
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureRulesIsMutable();
rules_.addAll(other.rules_);
}
onChanged();
}
} else {
if (!other.rules_.isEmpty()) {
if (rulesBuilder_.isEmpty()) {
rulesBuilder_.dispose();
rulesBuilder_ = null;
rules_ = other.rules_;
bitField0_ = (bitField0_ & ~0x00000002);
rulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRulesFieldBuilder() : null;
} else {
rulesBuilder_.addAllMessages(other.rules_);
}
}
}
if (other.getDefaultForNetwork() != false) {
setDefaultForNetwork(other.getDefaultForNetwork());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object folderId_ = "";
/**
* string folder_id = 2;
* @return The folderId.
*/
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
folderId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string folder_id = 2;
* @return The bytes for folderId.
*/
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string folder_id = 2;
* @param value The folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
folderId_ = value;
onChanged();
return this;
}
/**
* string folder_id = 2;
* @return This builder for chaining.
*/
public Builder clearFolderId() {
folderId_ = getDefaultInstance().getFolderId();
onChanged();
return this;
}
/**
* string folder_id = 2;
* @param value The bytes for folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
folderId_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private java.lang.Object name_ = "";
/**
* string name = 4;
* @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;
}
}
/**
* string name = 4;
* @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;
}
}
/**
* string name = 4;
* @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;
onChanged();
return this;
}
/**
* string name = 4;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* string name = 4;
* @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;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* string description = 5;
* @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;
}
}
/**
* string description = 5;
* @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;
}
}
/**
* string description = 5;
* @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;
onChanged();
return this;
}
/**
* string description = 5;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
* string description = 5;
* @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;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
* map<string, string> labels = 6;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
* map<string, string> labels = 6;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, string> labels = 6;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object networkId_ = "";
/**
* string network_id = 7;
* @return The networkId.
*/
public java.lang.String getNetworkId() {
java.lang.Object ref = networkId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
networkId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string network_id = 7;
* @return The bytes for networkId.
*/
public com.google.protobuf.ByteString
getNetworkIdBytes() {
java.lang.Object ref = networkId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
networkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string network_id = 7;
* @param value The networkId to set.
* @return This builder for chaining.
*/
public Builder setNetworkId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
networkId_ = value;
onChanged();
return this;
}
/**
* string network_id = 7;
* @return This builder for chaining.
*/
public Builder clearNetworkId() {
networkId_ = getDefaultInstance().getNetworkId();
onChanged();
return this;
}
/**
* string network_id = 7;
* @param value The bytes for networkId to set.
* @return This builder for chaining.
*/
public Builder setNetworkIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
networkId_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status result = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status.UNRECOGNIZED : result;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroup.Status status = 8;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private java.util.List rules_ =
java.util.Collections.emptyList();
private void ensureRulesIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
rules_ = new java.util.ArrayList(rules_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder> rulesBuilder_;
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public java.util.List getRulesList() {
if (rulesBuilder_ == null) {
return java.util.Collections.unmodifiableList(rules_);
} else {
return rulesBuilder_.getMessageList();
}
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public int getRulesCount() {
if (rulesBuilder_ == null) {
return rules_.size();
} else {
return rulesBuilder_.getCount();
}
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getRules(int index) {
if (rulesBuilder_ == null) {
return rules_.get(index);
} else {
return rulesBuilder_.getMessage(index);
}
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder setRules(
int index, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.set(index, value);
onChanged();
} else {
rulesBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder setRules(
int index, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.set(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder addRules(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(value);
onChanged();
} else {
rulesBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder addRules(
int index, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule value) {
if (rulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRulesIsMutable();
rules_.add(index, value);
onChanged();
} else {
rulesBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder addRules(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder addRules(
int index, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder builderForValue) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.add(index, builderForValue.build());
onChanged();
} else {
rulesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder addAllRules(
java.lang.Iterable extends yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule> values) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rules_);
onChanged();
} else {
rulesBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder clearRules() {
if (rulesBuilder_ == null) {
rules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
rulesBuilder_.clear();
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public Builder removeRules(int index) {
if (rulesBuilder_ == null) {
ensureRulesIsMutable();
rules_.remove(index);
onChanged();
} else {
rulesBuilder_.remove(index);
}
return this;
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder getRulesBuilder(
int index) {
return getRulesFieldBuilder().getBuilder(index);
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder getRulesOrBuilder(
int index) {
if (rulesBuilder_ == null) {
return rules_.get(index); } else {
return rulesBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public java.util.List extends yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder>
getRulesOrBuilderList() {
if (rulesBuilder_ != null) {
return rulesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rules_);
}
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder addRulesBuilder() {
return getRulesFieldBuilder().addBuilder(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.getDefaultInstance());
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder addRulesBuilder(
int index) {
return getRulesFieldBuilder().addBuilder(
index, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.getDefaultInstance());
}
/**
* repeated .yandex.cloud.vpc.v1.SecurityGroupRule rules = 9;
*/
public java.util.List
getRulesBuilderList() {
return getRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder>
getRulesFieldBuilder() {
if (rulesBuilder_ == null) {
rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder>(
rules_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
rules_ = null;
}
return rulesBuilder_;
}
private boolean defaultForNetwork_ ;
/**
* bool default_for_network = 10;
* @return The defaultForNetwork.
*/
@java.lang.Override
public boolean getDefaultForNetwork() {
return defaultForNetwork_;
}
/**
* bool default_for_network = 10;
* @param value The defaultForNetwork to set.
* @return This builder for chaining.
*/
public Builder setDefaultForNetwork(boolean value) {
defaultForNetwork_ = value;
onChanged();
return this;
}
/**
* bool default_for_network = 10;
* @return This builder for chaining.
*/
public Builder clearDefaultForNetwork() {
defaultForNetwork_ = false;
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:yandex.cloud.vpc.v1.SecurityGroup)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.vpc.v1.SecurityGroup)
private static final yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup();
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SecurityGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SecurityGroup(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface SecurityGroupRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.vpc.v1.SecurityGroupRule)
com.google.protobuf.MessageOrBuilder {
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
* string description = 2;
* @return The description.
*/
java.lang.String getDescription();
/**
* string description = 2;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
* map<string, string> labels = 3;
*/
int getLabelsCount();
/**
* map<string, string> labels = 3;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
* map<string, string> labels = 3;
*/
java.util.Map
getLabelsMap();
/**
* map<string, string> labels = 3;
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
* map<string, string> labels = 3;
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for direction.
*/
int getDirectionValue();
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The direction.
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction getDirection();
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return Whether the ports field is set.
*/
boolean hasPorts();
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return The ports.
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getPorts();
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder getPortsOrBuilder();
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The protocolName.
*/
java.lang.String getProtocolName();
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The bytes for protocolName.
*/
com.google.protobuf.ByteString
getProtocolNameBytes();
/**
* int64 protocol_number = 7;
* @return The protocolNumber.
*/
long getProtocolNumber();
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return Whether the cidrBlocks field is set.
*/
boolean hasCidrBlocks();
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return The cidrBlocks.
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getCidrBlocks();
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder getCidrBlocksOrBuilder();
/**
* string security_group_id = 9;
* @return Whether the securityGroupId field is set.
*/
boolean hasSecurityGroupId();
/**
* string security_group_id = 9;
* @return The securityGroupId.
*/
java.lang.String getSecurityGroupId();
/**
* string security_group_id = 9;
* @return The bytes for securityGroupId.
*/
com.google.protobuf.ByteString
getSecurityGroupIdBytes();
/**
* string predefined_target = 10;
* @return Whether the predefinedTarget field is set.
*/
boolean hasPredefinedTarget();
/**
* string predefined_target = 10;
* @return The predefinedTarget.
*/
java.lang.String getPredefinedTarget();
/**
* string predefined_target = 10;
* @return The bytes for predefinedTarget.
*/
com.google.protobuf.ByteString
getPredefinedTargetBytes();
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.TargetCase getTargetCase();
}
/**
* Protobuf type {@code yandex.cloud.vpc.v1.SecurityGroupRule}
*/
public static final class SecurityGroupRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.vpc.v1.SecurityGroupRule)
SecurityGroupRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use SecurityGroupRule.newBuilder() to construct.
private SecurityGroupRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SecurityGroupRule() {
id_ = "";
description_ = "";
direction_ = 0;
protocolName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SecurityGroupRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SecurityGroupRule(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 32: {
int rawValue = input.readEnum();
direction_ = rawValue;
break;
}
case 42: {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder subBuilder = null;
if (ports_ != null) {
subBuilder = ports_.toBuilder();
}
ports_ = input.readMessage(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(ports_);
ports_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
protocolName_ = s;
break;
}
case 56: {
protocolNumber_ = input.readInt64();
break;
}
case 66: {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder subBuilder = null;
if (targetCase_ == 8) {
subBuilder = ((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_).toBuilder();
}
target_ =
input.readMessage(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_);
target_ = subBuilder.buildPartial();
}
targetCase_ = 8;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
targetCase_ = 9;
target_ = s;
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
targetCase_ = 10;
target_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.vpc.v1.SecurityGroupRule.Direction}
*/
public enum Direction
implements com.google.protobuf.ProtocolMessageEnum {
/**
* DIRECTION_UNSPECIFIED = 0;
*/
DIRECTION_UNSPECIFIED(0),
/**
* INGRESS = 1;
*/
INGRESS(1),
/**
* EGRESS = 2;
*/
EGRESS(2),
UNRECOGNIZED(-1),
;
/**
* DIRECTION_UNSPECIFIED = 0;
*/
public static final int DIRECTION_UNSPECIFIED_VALUE = 0;
/**
* INGRESS = 1;
*/
public static final int INGRESS_VALUE = 1;
/**
* EGRESS = 2;
*/
public static final int EGRESS_VALUE = 2;
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 Direction 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 Direction forNumber(int value) {
switch (value) {
case 0: return DIRECTION_UNSPECIFIED;
case 1: return INGRESS;
case 2: return EGRESS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Direction> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Direction findValueByNumber(int number) {
return Direction.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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.getDescriptor().getEnumTypes().get(0);
}
private static final Direction[] VALUES = values();
public static Direction 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 Direction(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.vpc.v1.SecurityGroupRule.Direction)
}
private int targetCase_ = 0;
private java.lang.Object target_;
public enum TargetCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
CIDR_BLOCKS(8),
SECURITY_GROUP_ID(9),
PREDEFINED_TARGET(10),
TARGET_NOT_SET(0);
private final int value;
private TargetCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static TargetCase valueOf(int value) {
return forNumber(value);
}
public static TargetCase forNumber(int value) {
switch (value) {
case 8: return CIDR_BLOCKS;
case 9: return SECURITY_GROUP_ID;
case 10: return PREDEFINED_TARGET;
case 0: return TARGET_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public TargetCase
getTargetCase() {
return TargetCase.forNumber(
targetCase_);
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
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();
id_ = s;
return s;
}
}
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 2;
private volatile java.lang.Object description_;
/**
* string description = 2;
* @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;
}
}
/**
* string description = 2;
* @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 LABELS_FIELD_NUMBER = 3;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int DIRECTION_FIELD_NUMBER = 4;
private int direction_;
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for direction.
*/
@java.lang.Override public int getDirectionValue() {
return direction_;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The direction.
*/
@java.lang.Override public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction getDirection() {
@SuppressWarnings("deprecation")
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction result = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.valueOf(direction_);
return result == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.UNRECOGNIZED : result;
}
public static final int PORTS_FIELD_NUMBER = 5;
private yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange ports_;
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return Whether the ports field is set.
*/
@java.lang.Override
public boolean hasPorts() {
return ports_ != null;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return The ports.
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getPorts() {
return ports_ == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.getDefaultInstance() : ports_;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder getPortsOrBuilder() {
return getPorts();
}
public static final int PROTOCOL_NAME_FIELD_NUMBER = 6;
private volatile java.lang.Object protocolName_;
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The protocolName.
*/
@java.lang.Override
public java.lang.String getProtocolName() {
java.lang.Object ref = protocolName_;
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();
protocolName_ = s;
return s;
}
}
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The bytes for protocolName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getProtocolNameBytes() {
java.lang.Object ref = protocolName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
protocolName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PROTOCOL_NUMBER_FIELD_NUMBER = 7;
private long protocolNumber_;
/**
* int64 protocol_number = 7;
* @return The protocolNumber.
*/
@java.lang.Override
public long getProtocolNumber() {
return protocolNumber_;
}
public static final int CIDR_BLOCKS_FIELD_NUMBER = 8;
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return Whether the cidrBlocks field is set.
*/
@java.lang.Override
public boolean hasCidrBlocks() {
return targetCase_ == 8;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return The cidrBlocks.
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getCidrBlocks() {
if (targetCase_ == 8) {
return (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_;
}
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder getCidrBlocksOrBuilder() {
if (targetCase_ == 8) {
return (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_;
}
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
public static final int SECURITY_GROUP_ID_FIELD_NUMBER = 9;
/**
* string security_group_id = 9;
* @return Whether the securityGroupId field is set.
*/
public boolean hasSecurityGroupId() {
return targetCase_ == 9;
}
/**
* string security_group_id = 9;
* @return The securityGroupId.
*/
public java.lang.String getSecurityGroupId() {
java.lang.Object ref = "";
if (targetCase_ == 9) {
ref = target_;
}
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();
if (targetCase_ == 9) {
target_ = s;
}
return s;
}
}
/**
* string security_group_id = 9;
* @return The bytes for securityGroupId.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdBytes() {
java.lang.Object ref = "";
if (targetCase_ == 9) {
ref = target_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 9) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PREDEFINED_TARGET_FIELD_NUMBER = 10;
/**
* string predefined_target = 10;
* @return Whether the predefinedTarget field is set.
*/
public boolean hasPredefinedTarget() {
return targetCase_ == 10;
}
/**
* string predefined_target = 10;
* @return The predefinedTarget.
*/
public java.lang.String getPredefinedTarget() {
java.lang.Object ref = "";
if (targetCase_ == 10) {
ref = target_;
}
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();
if (targetCase_ == 10) {
target_ = s;
}
return s;
}
}
/**
* string predefined_target = 10;
* @return The bytes for predefinedTarget.
*/
public com.google.protobuf.ByteString
getPredefinedTargetBytes() {
java.lang.Object ref = "";
if (targetCase_ == 10) {
ref = target_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 10) {
target_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
3);
if (direction_ != yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.DIRECTION_UNSPECIFIED.getNumber()) {
output.writeEnum(4, direction_);
}
if (ports_ != null) {
output.writeMessage(5, getPorts());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocolName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, protocolName_);
}
if (protocolNumber_ != 0L) {
output.writeInt64(7, protocolNumber_);
}
if (targetCase_ == 8) {
output.writeMessage(8, (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_);
}
if (targetCase_ == 9) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, target_);
}
if (targetCase_ == 10) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, target_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, labels__);
}
if (direction_ != yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.DIRECTION_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, direction_);
}
if (ports_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getPorts());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(protocolName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, protocolName_);
}
if (protocolNumber_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(7, protocolNumber_);
}
if (targetCase_ == 8) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_);
}
if (targetCase_ == 9) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, target_);
}
if (targetCase_ == 10) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, target_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule)) {
return super.equals(obj);
}
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule other = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (direction_ != other.direction_) return false;
if (hasPorts() != other.hasPorts()) return false;
if (hasPorts()) {
if (!getPorts()
.equals(other.getPorts())) return false;
}
if (!getProtocolName()
.equals(other.getProtocolName())) return false;
if (getProtocolNumber()
!= other.getProtocolNumber()) return false;
if (!getTargetCase().equals(other.getTargetCase())) return false;
switch (targetCase_) {
case 8:
if (!getCidrBlocks()
.equals(other.getCidrBlocks())) return false;
break;
case 9:
if (!getSecurityGroupId()
.equals(other.getSecurityGroupId())) return false;
break;
case 10:
if (!getPredefinedTarget()
.equals(other.getPredefinedTarget())) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + DIRECTION_FIELD_NUMBER;
hash = (53 * hash) + direction_;
if (hasPorts()) {
hash = (37 * hash) + PORTS_FIELD_NUMBER;
hash = (53 * hash) + getPorts().hashCode();
}
hash = (37 * hash) + PROTOCOL_NAME_FIELD_NUMBER;
hash = (53 * hash) + getProtocolName().hashCode();
hash = (37 * hash) + PROTOCOL_NUMBER_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getProtocolNumber());
switch (targetCase_) {
case 8:
hash = (37 * hash) + CIDR_BLOCKS_FIELD_NUMBER;
hash = (53 * hash) + getCidrBlocks().hashCode();
break;
case 9:
hash = (37 * hash) + SECURITY_GROUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getSecurityGroupId().hashCode();
break;
case 10:
hash = (37 * hash) + PREDEFINED_TARGET_FIELD_NUMBER;
hash = (53 * hash) + getPredefinedTarget().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule 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(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule 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 yandex.cloud.vpc.v1.SecurityGroupRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.vpc.v1.SecurityGroupRule)
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 3:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 3:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Builder.class);
}
// Construct using yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
description_ = "";
internalGetMutableLabels().clear();
direction_ = 0;
if (portsBuilder_ == null) {
ports_ = null;
} else {
ports_ = null;
portsBuilder_ = null;
}
protocolName_ = "";
protocolNumber_ = 0L;
targetCase_ = 0;
target_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getDefaultInstanceForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule build() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule buildPartial() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule result = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.direction_ = direction_;
if (portsBuilder_ == null) {
result.ports_ = ports_;
} else {
result.ports_ = portsBuilder_.build();
}
result.protocolName_ = protocolName_;
result.protocolNumber_ = protocolNumber_;
if (targetCase_ == 8) {
if (cidrBlocksBuilder_ == null) {
result.target_ = target_;
} else {
result.target_ = cidrBlocksBuilder_.build();
}
}
if (targetCase_ == 9) {
result.target_ = target_;
}
if (targetCase_ == 10) {
result.target_ = target_;
}
result.targetCase_ = targetCase_;
onBuilt();
return result;
}
@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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule) {
return mergeFrom((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule other) {
if (other == yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.direction_ != 0) {
setDirectionValue(other.getDirectionValue());
}
if (other.hasPorts()) {
mergePorts(other.getPorts());
}
if (!other.getProtocolName().isEmpty()) {
protocolName_ = other.protocolName_;
onChanged();
}
if (other.getProtocolNumber() != 0L) {
setProtocolNumber(other.getProtocolNumber());
}
switch (other.getTargetCase()) {
case CIDR_BLOCKS: {
mergeCidrBlocks(other.getCidrBlocks());
break;
}
case SECURITY_GROUP_ID: {
targetCase_ = 9;
target_ = other.target_;
onChanged();
break;
}
case PREDEFINED_TARGET: {
targetCase_ = 10;
target_ = other.target_;
onChanged();
break;
}
case TARGET_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int targetCase_ = 0;
private java.lang.Object target_;
public TargetCase
getTargetCase() {
return TargetCase.forNumber(
targetCase_);
}
public Builder clearTarget() {
targetCase_ = 0;
target_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
*generated by api server after rule creation
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object description_ = "";
/**
* string description = 2;
* @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;
}
}
/**
* string description = 2;
* @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;
}
}
/**
* string description = 2;
* @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;
onChanged();
return this;
}
/**
* string description = 2;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
* string description = 2;
* @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;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
* map<string, string> labels = 3;
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
* map<string, string> labels = 3;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
* map<string, string> labels = 3;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
* map<string, string> labels = 3;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private int direction_ = 0;
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for direction.
*/
@java.lang.Override public int getDirectionValue() {
return direction_;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for direction to set.
* @return This builder for chaining.
*/
public Builder setDirectionValue(int value) {
direction_ = value;
onChanged();
return this;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return The direction.
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction getDirection() {
@SuppressWarnings("deprecation")
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction result = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.valueOf(direction_);
return result == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction.UNRECOGNIZED : result;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @param value The direction to set.
* @return This builder for chaining.
*/
public Builder setDirection(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule.Direction value) {
if (value == null) {
throw new NullPointerException();
}
direction_ = value.getNumber();
onChanged();
return this;
}
/**
* .yandex.cloud.vpc.v1.SecurityGroupRule.Direction direction = 4 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearDirection() {
direction_ = 0;
onChanged();
return this;
}
private yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange ports_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder> portsBuilder_;
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return Whether the ports field is set.
*/
public boolean hasPorts() {
return portsBuilder_ != null || ports_ != null;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
* @return The ports.
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getPorts() {
if (portsBuilder_ == null) {
return ports_ == null ? yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.getDefaultInstance() : ports_;
} else {
return portsBuilder_.getMessage();
}
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public Builder setPorts(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange value) {
if (portsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ports_ = value;
onChanged();
} else {
portsBuilder_.setMessage(value);
}
return this;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public Builder setPorts(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder builderForValue) {
if (portsBuilder_ == null) {
ports_ = builderForValue.build();
onChanged();
} else {
portsBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public Builder mergePorts(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange value) {
if (portsBuilder_ == null) {
if (ports_ != null) {
ports_ =
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.newBuilder(ports_).mergeFrom(value).buildPartial();
} else {
ports_ = value;
}
onChanged();
} else {
portsBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public Builder clearPorts() {
if (portsBuilder_ == null) {
ports_ = null;
onChanged();
} else {
ports_ = null;
portsBuilder_ = null;
}
return this;
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder getPortsBuilder() {
onChanged();
return getPortsFieldBuilder().getBuilder();
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder getPortsOrBuilder() {
if (portsBuilder_ != null) {
return portsBuilder_.getMessageOrBuilder();
} else {
return ports_ == null ?
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.getDefaultInstance() : ports_;
}
}
/**
*
* null value means any
*
*
* .yandex.cloud.vpc.v1.PortRange ports = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder>
getPortsFieldBuilder() {
if (portsBuilder_ == null) {
portsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder>(
getPorts(),
getParentForChildren(),
isClean());
ports_ = null;
}
return portsBuilder_;
}
private java.lang.Object protocolName_ = "";
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The protocolName.
*/
public java.lang.String getProtocolName() {
java.lang.Object ref = protocolName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
protocolName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return The bytes for protocolName.
*/
public com.google.protobuf.ByteString
getProtocolNameBytes() {
java.lang.Object ref = protocolName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
protocolName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @param value The protocolName to set.
* @return This builder for chaining.
*/
public Builder setProtocolName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
protocolName_ = value;
onChanged();
return this;
}
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @return This builder for chaining.
*/
public Builder clearProtocolName() {
protocolName_ = getDefaultInstance().getProtocolName();
onChanged();
return this;
}
/**
*
* null value means any protocol
* values from https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml
*
*
* string protocol_name = 6;
* @param value The bytes for protocolName to set.
* @return This builder for chaining.
*/
public Builder setProtocolNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
protocolName_ = value;
onChanged();
return this;
}
private long protocolNumber_ ;
/**
* int64 protocol_number = 7;
* @return The protocolNumber.
*/
@java.lang.Override
public long getProtocolNumber() {
return protocolNumber_;
}
/**
* int64 protocol_number = 7;
* @param value The protocolNumber to set.
* @return This builder for chaining.
*/
public Builder setProtocolNumber(long value) {
protocolNumber_ = value;
onChanged();
return this;
}
/**
* int64 protocol_number = 7;
* @return This builder for chaining.
*/
public Builder clearProtocolNumber() {
protocolNumber_ = 0L;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder> cidrBlocksBuilder_;
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return Whether the cidrBlocks field is set.
*/
@java.lang.Override
public boolean hasCidrBlocks() {
return targetCase_ == 8;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
* @return The cidrBlocks.
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getCidrBlocks() {
if (cidrBlocksBuilder_ == null) {
if (targetCase_ == 8) {
return (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_;
}
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
} else {
if (targetCase_ == 8) {
return cidrBlocksBuilder_.getMessage();
}
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
public Builder setCidrBlocks(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks value) {
if (cidrBlocksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
target_ = value;
onChanged();
} else {
cidrBlocksBuilder_.setMessage(value);
}
targetCase_ = 8;
return this;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
public Builder setCidrBlocks(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder builderForValue) {
if (cidrBlocksBuilder_ == null) {
target_ = builderForValue.build();
onChanged();
} else {
cidrBlocksBuilder_.setMessage(builderForValue.build());
}
targetCase_ = 8;
return this;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
public Builder mergeCidrBlocks(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks value) {
if (cidrBlocksBuilder_ == null) {
if (targetCase_ == 8 &&
target_ != yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance()) {
target_ = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.newBuilder((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_)
.mergeFrom(value).buildPartial();
} else {
target_ = value;
}
onChanged();
} else {
if (targetCase_ == 8) {
cidrBlocksBuilder_.mergeFrom(value);
}
cidrBlocksBuilder_.setMessage(value);
}
targetCase_ = 8;
return this;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
public Builder clearCidrBlocks() {
if (cidrBlocksBuilder_ == null) {
if (targetCase_ == 8) {
targetCase_ = 0;
target_ = null;
onChanged();
}
} else {
if (targetCase_ == 8) {
targetCase_ = 0;
target_ = null;
}
cidrBlocksBuilder_.clear();
}
return this;
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder getCidrBlocksBuilder() {
return getCidrBlocksFieldBuilder().getBuilder();
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder getCidrBlocksOrBuilder() {
if ((targetCase_ == 8) && (cidrBlocksBuilder_ != null)) {
return cidrBlocksBuilder_.getMessageOrBuilder();
} else {
if (targetCase_ == 8) {
return (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_;
}
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
}
/**
* .yandex.cloud.vpc.v1.CidrBlocks cidr_blocks = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder>
getCidrBlocksFieldBuilder() {
if (cidrBlocksBuilder_ == null) {
if (!(targetCase_ == 8)) {
target_ = yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
cidrBlocksBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder>(
(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) target_,
getParentForChildren(),
isClean());
target_ = null;
}
targetCase_ = 8;
onChanged();;
return cidrBlocksBuilder_;
}
/**
* string security_group_id = 9;
* @return Whether the securityGroupId field is set.
*/
@java.lang.Override
public boolean hasSecurityGroupId() {
return targetCase_ == 9;
}
/**
* string security_group_id = 9;
* @return The securityGroupId.
*/
@java.lang.Override
public java.lang.String getSecurityGroupId() {
java.lang.Object ref = "";
if (targetCase_ == 9) {
ref = target_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (targetCase_ == 9) {
target_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string security_group_id = 9;
* @return The bytes for securityGroupId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSecurityGroupIdBytes() {
java.lang.Object ref = "";
if (targetCase_ == 9) {
ref = target_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 9) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string security_group_id = 9;
* @param value The securityGroupId to set.
* @return This builder for chaining.
*/
public Builder setSecurityGroupId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
targetCase_ = 9;
target_ = value;
onChanged();
return this;
}
/**
* string security_group_id = 9;
* @return This builder for chaining.
*/
public Builder clearSecurityGroupId() {
if (targetCase_ == 9) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
/**
* string security_group_id = 9;
* @param value The bytes for securityGroupId to set.
* @return This builder for chaining.
*/
public Builder setSecurityGroupIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
targetCase_ = 9;
target_ = value;
onChanged();
return this;
}
/**
* string predefined_target = 10;
* @return Whether the predefinedTarget field is set.
*/
@java.lang.Override
public boolean hasPredefinedTarget() {
return targetCase_ == 10;
}
/**
* string predefined_target = 10;
* @return The predefinedTarget.
*/
@java.lang.Override
public java.lang.String getPredefinedTarget() {
java.lang.Object ref = "";
if (targetCase_ == 10) {
ref = target_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (targetCase_ == 10) {
target_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* string predefined_target = 10;
* @return The bytes for predefinedTarget.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPredefinedTargetBytes() {
java.lang.Object ref = "";
if (targetCase_ == 10) {
ref = target_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (targetCase_ == 10) {
target_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* string predefined_target = 10;
* @param value The predefinedTarget to set.
* @return This builder for chaining.
*/
public Builder setPredefinedTarget(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
targetCase_ = 10;
target_ = value;
onChanged();
return this;
}
/**
* string predefined_target = 10;
* @return This builder for chaining.
*/
public Builder clearPredefinedTarget() {
if (targetCase_ == 10) {
targetCase_ = 0;
target_ = null;
onChanged();
}
return this;
}
/**
* string predefined_target = 10;
* @param value The bytes for predefinedTarget to set.
* @return This builder for chaining.
*/
public Builder setPredefinedTargetBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
targetCase_ = 10;
target_ = value;
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:yandex.cloud.vpc.v1.SecurityGroupRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.vpc.v1.SecurityGroupRule)
private static final yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule();
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SecurityGroupRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SecurityGroupRule(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.SecurityGroupRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PortRangeOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.vpc.v1.PortRange)
com.google.protobuf.MessageOrBuilder {
/**
* int64 from_port = 1 [(.yandex.cloud.value) = "0-65535"];
* @return The fromPort.
*/
long getFromPort();
/**
* int64 to_port = 2 [(.yandex.cloud.value) = "0-65535"];
* @return The toPort.
*/
long getToPort();
}
/**
* Protobuf type {@code yandex.cloud.vpc.v1.PortRange}
*/
public static final class PortRange extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.vpc.v1.PortRange)
PortRangeOrBuilder {
private static final long serialVersionUID = 0L;
// Use PortRange.newBuilder() to construct.
private PortRange(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private PortRange() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new PortRange();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private PortRange(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
fromPort_ = input.readInt64();
break;
}
case 16: {
toPort_ = input.readInt64();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_PortRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_PortRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder.class);
}
public static final int FROM_PORT_FIELD_NUMBER = 1;
private long fromPort_;
/**
* int64 from_port = 1 [(.yandex.cloud.value) = "0-65535"];
* @return The fromPort.
*/
@java.lang.Override
public long getFromPort() {
return fromPort_;
}
public static final int TO_PORT_FIELD_NUMBER = 2;
private long toPort_;
/**
* int64 to_port = 2 [(.yandex.cloud.value) = "0-65535"];
* @return The toPort.
*/
@java.lang.Override
public long getToPort() {
return toPort_;
}
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 (fromPort_ != 0L) {
output.writeInt64(1, fromPort_);
}
if (toPort_ != 0L) {
output.writeInt64(2, toPort_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (fromPort_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, fromPort_);
}
if (toPort_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, toPort_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange)) {
return super.equals(obj);
}
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange other = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange) obj;
if (getFromPort()
!= other.getFromPort()) return false;
if (getToPort()
!= other.getToPort()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FROM_PORT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getFromPort());
hash = (37 * hash) + TO_PORT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getToPort());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange 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(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange 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 yandex.cloud.vpc.v1.PortRange}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.vpc.v1.PortRange)
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRangeOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_PortRange_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_PortRange_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.Builder.class);
}
// Construct using yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
fromPort_ = 0L;
toPort_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_PortRange_descriptor;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getDefaultInstanceForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange build() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange buildPartial() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange result = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange(this);
result.fromPort_ = fromPort_;
result.toPort_ = toPort_;
onBuilt();
return result;
}
@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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange) {
return mergeFrom((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange other) {
if (other == yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange.getDefaultInstance()) return this;
if (other.getFromPort() != 0L) {
setFromPort(other.getFromPort());
}
if (other.getToPort() != 0L) {
setToPort(other.getToPort());
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long fromPort_ ;
/**
* int64 from_port = 1 [(.yandex.cloud.value) = "0-65535"];
* @return The fromPort.
*/
@java.lang.Override
public long getFromPort() {
return fromPort_;
}
/**
* int64 from_port = 1 [(.yandex.cloud.value) = "0-65535"];
* @param value The fromPort to set.
* @return This builder for chaining.
*/
public Builder setFromPort(long value) {
fromPort_ = value;
onChanged();
return this;
}
/**
* int64 from_port = 1 [(.yandex.cloud.value) = "0-65535"];
* @return This builder for chaining.
*/
public Builder clearFromPort() {
fromPort_ = 0L;
onChanged();
return this;
}
private long toPort_ ;
/**
* int64 to_port = 2 [(.yandex.cloud.value) = "0-65535"];
* @return The toPort.
*/
@java.lang.Override
public long getToPort() {
return toPort_;
}
/**
* int64 to_port = 2 [(.yandex.cloud.value) = "0-65535"];
* @param value The toPort to set.
* @return This builder for chaining.
*/
public Builder setToPort(long value) {
toPort_ = value;
onChanged();
return this;
}
/**
* int64 to_port = 2 [(.yandex.cloud.value) = "0-65535"];
* @return This builder for chaining.
*/
public Builder clearToPort() {
toPort_ = 0L;
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:yandex.cloud.vpc.v1.PortRange)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.vpc.v1.PortRange)
private static final yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange();
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PortRange parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PortRange(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.PortRange getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CidrBlocksOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.vpc.v1.CidrBlocks)
com.google.protobuf.MessageOrBuilder {
/**
* repeated string v4_cidr_blocks = 1;
* @return A list containing the v4CidrBlocks.
*/
java.util.List
getV4CidrBlocksList();
/**
* repeated string v4_cidr_blocks = 1;
* @return The count of v4CidrBlocks.
*/
int getV4CidrBlocksCount();
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the element to return.
* @return The v4CidrBlocks at the given index.
*/
java.lang.String getV4CidrBlocks(int index);
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the value to return.
* @return The bytes of the v4CidrBlocks at the given index.
*/
com.google.protobuf.ByteString
getV4CidrBlocksBytes(int index);
/**
* repeated string v6_cidr_blocks = 2;
* @return A list containing the v6CidrBlocks.
*/
java.util.List
getV6CidrBlocksList();
/**
* repeated string v6_cidr_blocks = 2;
* @return The count of v6CidrBlocks.
*/
int getV6CidrBlocksCount();
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the element to return.
* @return The v6CidrBlocks at the given index.
*/
java.lang.String getV6CidrBlocks(int index);
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the value to return.
* @return The bytes of the v6CidrBlocks at the given index.
*/
com.google.protobuf.ByteString
getV6CidrBlocksBytes(int index);
}
/**
* Protobuf type {@code yandex.cloud.vpc.v1.CidrBlocks}
*/
public static final class CidrBlocks extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.vpc.v1.CidrBlocks)
CidrBlocksOrBuilder {
private static final long serialVersionUID = 0L;
// Use CidrBlocks.newBuilder() to construct.
private CidrBlocks(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CidrBlocks() {
v4CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
v6CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CidrBlocks();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CidrBlocks(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
v4CidrBlocks_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
v4CidrBlocks_.add(s);
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
v6CidrBlocks_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
v6CidrBlocks_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
v4CidrBlocks_ = v4CidrBlocks_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000002) != 0)) {
v6CidrBlocks_ = v6CidrBlocks_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_CidrBlocks_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder.class);
}
public static final int V4_CIDR_BLOCKS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList v4CidrBlocks_;
/**
* repeated string v4_cidr_blocks = 1;
* @return A list containing the v4CidrBlocks.
*/
public com.google.protobuf.ProtocolStringList
getV4CidrBlocksList() {
return v4CidrBlocks_;
}
/**
* repeated string v4_cidr_blocks = 1;
* @return The count of v4CidrBlocks.
*/
public int getV4CidrBlocksCount() {
return v4CidrBlocks_.size();
}
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the element to return.
* @return The v4CidrBlocks at the given index.
*/
public java.lang.String getV4CidrBlocks(int index) {
return v4CidrBlocks_.get(index);
}
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the value to return.
* @return The bytes of the v4CidrBlocks at the given index.
*/
public com.google.protobuf.ByteString
getV4CidrBlocksBytes(int index) {
return v4CidrBlocks_.getByteString(index);
}
public static final int V6_CIDR_BLOCKS_FIELD_NUMBER = 2;
private com.google.protobuf.LazyStringList v6CidrBlocks_;
/**
* repeated string v6_cidr_blocks = 2;
* @return A list containing the v6CidrBlocks.
*/
public com.google.protobuf.ProtocolStringList
getV6CidrBlocksList() {
return v6CidrBlocks_;
}
/**
* repeated string v6_cidr_blocks = 2;
* @return The count of v6CidrBlocks.
*/
public int getV6CidrBlocksCount() {
return v6CidrBlocks_.size();
}
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the element to return.
* @return The v6CidrBlocks at the given index.
*/
public java.lang.String getV6CidrBlocks(int index) {
return v6CidrBlocks_.get(index);
}
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the value to return.
* @return The bytes of the v6CidrBlocks at the given index.
*/
public com.google.protobuf.ByteString
getV6CidrBlocksBytes(int index) {
return v6CidrBlocks_.getByteString(index);
}
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 {
for (int i = 0; i < v4CidrBlocks_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, v4CidrBlocks_.getRaw(i));
}
for (int i = 0; i < v6CidrBlocks_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, v6CidrBlocks_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < v4CidrBlocks_.size(); i++) {
dataSize += computeStringSizeNoTag(v4CidrBlocks_.getRaw(i));
}
size += dataSize;
size += 1 * getV4CidrBlocksList().size();
}
{
int dataSize = 0;
for (int i = 0; i < v6CidrBlocks_.size(); i++) {
dataSize += computeStringSizeNoTag(v6CidrBlocks_.getRaw(i));
}
size += dataSize;
size += 1 * getV6CidrBlocksList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks)) {
return super.equals(obj);
}
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks other = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) obj;
if (!getV4CidrBlocksList()
.equals(other.getV4CidrBlocksList())) return false;
if (!getV6CidrBlocksList()
.equals(other.getV6CidrBlocksList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getV4CidrBlocksCount() > 0) {
hash = (37 * hash) + V4_CIDR_BLOCKS_FIELD_NUMBER;
hash = (53 * hash) + getV4CidrBlocksList().hashCode();
}
if (getV6CidrBlocksCount() > 0) {
hash = (37 * hash) + V6_CIDR_BLOCKS_FIELD_NUMBER;
hash = (53 * hash) + getV6CidrBlocksList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks 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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks 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(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks 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 yandex.cloud.vpc.v1.CidrBlocks}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.vpc.v1.CidrBlocks)
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocksOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_CidrBlocks_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.class, yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.Builder.class);
}
// Construct using yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
v4CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
v6CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getDefaultInstanceForType() {
return yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks build() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks buildPartial() {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks result = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks(this);
int from_bitField0_ = bitField0_;
if (((bitField0_ & 0x00000001) != 0)) {
v4CidrBlocks_ = v4CidrBlocks_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.v4CidrBlocks_ = v4CidrBlocks_;
if (((bitField0_ & 0x00000002) != 0)) {
v6CidrBlocks_ = v6CidrBlocks_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.v6CidrBlocks_ = v6CidrBlocks_;
onBuilt();
return result;
}
@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 yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) {
return mergeFrom((yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks other) {
if (other == yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks.getDefaultInstance()) return this;
if (!other.v4CidrBlocks_.isEmpty()) {
if (v4CidrBlocks_.isEmpty()) {
v4CidrBlocks_ = other.v4CidrBlocks_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureV4CidrBlocksIsMutable();
v4CidrBlocks_.addAll(other.v4CidrBlocks_);
}
onChanged();
}
if (!other.v6CidrBlocks_.isEmpty()) {
if (v6CidrBlocks_.isEmpty()) {
v6CidrBlocks_ = other.v6CidrBlocks_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureV6CidrBlocksIsMutable();
v6CidrBlocks_.addAll(other.v6CidrBlocks_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
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 {
yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.LazyStringList v4CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureV4CidrBlocksIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
v4CidrBlocks_ = new com.google.protobuf.LazyStringArrayList(v4CidrBlocks_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated string v4_cidr_blocks = 1;
* @return A list containing the v4CidrBlocks.
*/
public com.google.protobuf.ProtocolStringList
getV4CidrBlocksList() {
return v4CidrBlocks_.getUnmodifiableView();
}
/**
* repeated string v4_cidr_blocks = 1;
* @return The count of v4CidrBlocks.
*/
public int getV4CidrBlocksCount() {
return v4CidrBlocks_.size();
}
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the element to return.
* @return The v4CidrBlocks at the given index.
*/
public java.lang.String getV4CidrBlocks(int index) {
return v4CidrBlocks_.get(index);
}
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index of the value to return.
* @return The bytes of the v4CidrBlocks at the given index.
*/
public com.google.protobuf.ByteString
getV4CidrBlocksBytes(int index) {
return v4CidrBlocks_.getByteString(index);
}
/**
* repeated string v4_cidr_blocks = 1;
* @param index The index to set the value at.
* @param value The v4CidrBlocks to set.
* @return This builder for chaining.
*/
public Builder setV4CidrBlocks(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV4CidrBlocksIsMutable();
v4CidrBlocks_.set(index, value);
onChanged();
return this;
}
/**
* repeated string v4_cidr_blocks = 1;
* @param value The v4CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addV4CidrBlocks(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV4CidrBlocksIsMutable();
v4CidrBlocks_.add(value);
onChanged();
return this;
}
/**
* repeated string v4_cidr_blocks = 1;
* @param values The v4CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addAllV4CidrBlocks(
java.lang.Iterable values) {
ensureV4CidrBlocksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, v4CidrBlocks_);
onChanged();
return this;
}
/**
* repeated string v4_cidr_blocks = 1;
* @return This builder for chaining.
*/
public Builder clearV4CidrBlocks() {
v4CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated string v4_cidr_blocks = 1;
* @param value The bytes of the v4CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addV4CidrBlocksBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureV4CidrBlocksIsMutable();
v4CidrBlocks_.add(value);
onChanged();
return this;
}
private com.google.protobuf.LazyStringList v6CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureV6CidrBlocksIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
v6CidrBlocks_ = new com.google.protobuf.LazyStringArrayList(v6CidrBlocks_);
bitField0_ |= 0x00000002;
}
}
/**
* repeated string v6_cidr_blocks = 2;
* @return A list containing the v6CidrBlocks.
*/
public com.google.protobuf.ProtocolStringList
getV6CidrBlocksList() {
return v6CidrBlocks_.getUnmodifiableView();
}
/**
* repeated string v6_cidr_blocks = 2;
* @return The count of v6CidrBlocks.
*/
public int getV6CidrBlocksCount() {
return v6CidrBlocks_.size();
}
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the element to return.
* @return The v6CidrBlocks at the given index.
*/
public java.lang.String getV6CidrBlocks(int index) {
return v6CidrBlocks_.get(index);
}
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index of the value to return.
* @return The bytes of the v6CidrBlocks at the given index.
*/
public com.google.protobuf.ByteString
getV6CidrBlocksBytes(int index) {
return v6CidrBlocks_.getByteString(index);
}
/**
* repeated string v6_cidr_blocks = 2;
* @param index The index to set the value at.
* @param value The v6CidrBlocks to set.
* @return This builder for chaining.
*/
public Builder setV6CidrBlocks(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV6CidrBlocksIsMutable();
v6CidrBlocks_.set(index, value);
onChanged();
return this;
}
/**
* repeated string v6_cidr_blocks = 2;
* @param value The v6CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addV6CidrBlocks(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureV6CidrBlocksIsMutable();
v6CidrBlocks_.add(value);
onChanged();
return this;
}
/**
* repeated string v6_cidr_blocks = 2;
* @param values The v6CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addAllV6CidrBlocks(
java.lang.Iterable values) {
ensureV6CidrBlocksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, v6CidrBlocks_);
onChanged();
return this;
}
/**
* repeated string v6_cidr_blocks = 2;
* @return This builder for chaining.
*/
public Builder clearV6CidrBlocks() {
v6CidrBlocks_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
* repeated string v6_cidr_blocks = 2;
* @param value The bytes of the v6CidrBlocks to add.
* @return This builder for chaining.
*/
public Builder addV6CidrBlocksBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureV6CidrBlocksIsMutable();
v6CidrBlocks_.add(value);
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:yandex.cloud.vpc.v1.CidrBlocks)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.vpc.v1.CidrBlocks)
private static final yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks();
}
public static yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CidrBlocks parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CidrBlocks(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.vpc.v1.SecurityGroupOuterClass.CidrBlocks getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_SecurityGroup_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_PortRange_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_PortRange_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_vpc_v1_CidrBlocks_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n(yandex/cloud/vpc/v1/security_group.pro" +
"to\022\023yandex.cloud.vpc.v1\032\037google/protobuf" +
"/timestamp.proto\032\035yandex/cloud/validatio" +
"n.proto\"\353\003\n\rSecurityGroup\022\n\n\002id\030\001 \001(\t\022\021\n" +
"\tfolder_id\030\002 \001(\t\022.\n\ncreated_at\030\003 \001(\0132\032.g" +
"oogle.protobuf.Timestamp\022\014\n\004name\030\004 \001(\t\022\023" +
"\n\013description\030\005 \001(\t\022>\n\006labels\030\006 \003(\0132..ya" +
"ndex.cloud.vpc.v1.SecurityGroup.LabelsEn" +
"try\022\022\n\nnetwork_id\030\007 \001(\t\0229\n\006status\030\010 \001(\0162" +
").yandex.cloud.vpc.v1.SecurityGroup.Stat" +
"us\0225\n\005rules\030\t \003(\0132&.yandex.cloud.vpc.v1." +
"SecurityGroupRule\022\033\n\023default_for_network" +
"\030\n \001(\010\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" +
"lue\030\002 \001(\t:\0028\001\"V\n\006Status\022\026\n\022STATUS_UNSPEC" +
"IFIED\020\000\022\014\n\010CREATING\020\001\022\n\n\006ACTIVE\020\002\022\014\n\010UPD" +
"ATING\020\003\022\014\n\010DELETING\020\004\"\224\004\n\021SecurityGroupR" +
"ule\022\n\n\002id\030\001 \001(\t\022\023\n\013description\030\002 \001(\t\022B\n\006" +
"labels\030\003 \003(\01322.yandex.cloud.vpc.v1.Secur" +
"ityGroupRule.LabelsEntry\022I\n\tdirection\030\004 " +
"\001(\01620.yandex.cloud.vpc.v1.SecurityGroupR" +
"ule.DirectionB\004\350\3071\001\022-\n\005ports\030\005 \001(\0132\036.yan" +
"dex.cloud.vpc.v1.PortRange\022\025\n\rprotocol_n" +
"ame\030\006 \001(\t\022\027\n\017protocol_number\030\007 \001(\003\0226\n\013ci" +
"dr_blocks\030\010 \001(\0132\037.yandex.cloud.vpc.v1.Ci" +
"drBlocksH\000\022\033\n\021security_group_id\030\t \001(\tH\000\022" +
"\033\n\021predefined_target\030\n \001(\tH\000\032-\n\013LabelsEn" +
"try\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001\"?\n\tD" +
"irection\022\031\n\025DIRECTION_UNSPECIFIED\020\000\022\013\n\007I" +
"NGRESS\020\001\022\n\n\006EGRESS\020\002B\016\n\006target\022\004\300\3011\001\"I\n\t" +
"PortRange\022\036\n\tfrom_port\030\001 \001(\003B\013\372\3071\0070-6553" +
"5\022\034\n\007to_port\030\002 \001(\003B\013\372\3071\0070-65535\"<\n\nCidrB" +
"locks\022\026\n\016v4_cidr_blocks\030\001 \003(\t\022\026\n\016v6_cidr" +
"_blocks\030\002 \003(\tBV\n\027yandex.cloud.api.vpc.v1" +
"Z;github.com/yandex-cloud/go-genproto/ya" +
"ndex/cloud/vpc/v1;vpcb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
yandex.cloud.api.Validation.getDescriptor(),
});
internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_vpc_v1_SecurityGroup_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor,
new java.lang.String[] { "Id", "FolderId", "CreatedAt", "Name", "Description", "Labels", "NetworkId", "Status", "Rules", "DefaultForNetwork", });
internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_descriptor =
internal_static_yandex_cloud_vpc_v1_SecurityGroup_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_SecurityGroup_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor,
new java.lang.String[] { "Id", "Description", "Labels", "Direction", "Ports", "ProtocolName", "ProtocolNumber", "CidrBlocks", "SecurityGroupId", "PredefinedTarget", "Target", });
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_descriptor =
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_SecurityGroupRule_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_yandex_cloud_vpc_v1_PortRange_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_yandex_cloud_vpc_v1_PortRange_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_PortRange_descriptor,
new java.lang.String[] { "FromPort", "ToPort", });
internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor =
getDescriptor().getMessageTypes().get(3);
internal_static_yandex_cloud_vpc_v1_CidrBlocks_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_vpc_v1_CidrBlocks_descriptor,
new java.lang.String[] { "V4CidrBlocks", "V6CidrBlocks", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(yandex.cloud.api.Validation.exactlyOne);
registry.add(yandex.cloud.api.Validation.required);
registry.add(yandex.cloud.api.Validation.value);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.protobuf.TimestampProto.getDescriptor();
yandex.cloud.api.Validation.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy