com.google.cloud.securitycenter.v2.AzureMetadata Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-securitycenter-v2 Show documentation
Show all versions of proto-google-cloud-securitycenter-v2 Show documentation
Proto library for google-cloud-securitycenter
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/securitycenter/v2/resource.proto
// Protobuf Java Version: 3.25.5
package com.google.cloud.securitycenter.v2;
/**
*
*
*
* Azure metadata associated with the resource, only applicable if the finding's
* cloud provider is Microsoft Azure.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata}
*/
public final class AzureMetadata extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AzureMetadata)
AzureMetadataOrBuilder {
private static final long serialVersionUID = 0L;
// Use AzureMetadata.newBuilder() to construct.
private AzureMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AzureMetadata() {
managementGroups_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AzureMetadata();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.class,
com.google.cloud.securitycenter.v2.AzureMetadata.Builder.class);
}
public interface AzureManagementGroupOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* string id = 1;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* string id = 1;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();
}
/**
*
*
*
* Represents an Azure management group.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup}
*/
public static final class AzureManagementGroup extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)
AzureManagementGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use AzureManagementGroup.newBuilder() to construct.
private AzureManagementGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AzureManagementGroup() {
id_ = "";
displayName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AzureManagementGroup();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureManagementGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureManagementGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
}
}
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
getUnknownFields().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(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup other =
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup) obj;
if (!getId().equals(other.getId())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents an Azure management group.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureManagementGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureManagementGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
.class);
}
// Construct using
// com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
displayName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureManagementGroup_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup build() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup buildPartial() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup result =
new com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup) {
return mergeFrom(
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup other) {
if (other
== com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* string id = 1;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The UUID of the Azure management group, for example,
* `20000000-0001-0000-0000-000000000000`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The display name of the Azure management group.
*
*
* string display_name = 2;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup)
private static final com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup();
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AzureManagementGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AzureSubscriptionOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* string id = 1;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* string id = 1;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
java.lang.String getDisplayName();
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
com.google.protobuf.ByteString getDisplayNameBytes();
}
/**
*
*
*
* Represents an Azure subscription.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription}
*/
public static final class AzureSubscription extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)
AzureSubscriptionOrBuilder {
private static final long serialVersionUID = 0L;
// Use AzureSubscription.newBuilder() to construct.
private AzureSubscription(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AzureSubscription() {
id_ = "";
displayName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AzureSubscription();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureSubscription_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureSubscription_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder.class);
}
public static final int ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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 DISPLAY_NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
@java.lang.Override
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
}
}
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
@java.lang.Override
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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(displayName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_);
}
getUnknownFields().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(displayName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription other =
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription) obj;
if (!getId().equals(other.getId())) return false;
if (!getDisplayName().equals(other.getDisplayName())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDisplayName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents an Azure subscription.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureSubscription_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureSubscription_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder.class);
}
// Construct using
// com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
id_ = "";
displayName_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureSubscription_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription build() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription buildPartial() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription result =
new com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.id_ = id_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.displayName_ = displayName_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription) {
return mergeFrom(
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription other) {
if (other
== com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getDisplayName().isEmpty()) {
displayName_ = other.displayName_;
bitField0_ |= 0x00000002;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
displayName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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;
}
}
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* string id = 1;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The UUID of the Azure subscription, for example,
* `291bba3f-e0a5-47bc-a099-3bdcb2a50a05`.
*
*
* 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;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object displayName_ = "";
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The displayName.
*/
public java.lang.String getDisplayName() {
java.lang.Object ref = displayName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
displayName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return The bytes for displayName.
*/
public com.google.protobuf.ByteString getDisplayNameBytes() {
java.lang.Object ref = displayName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
displayName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @param value The displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @return This builder for chaining.
*/
public Builder clearDisplayName() {
displayName_ = getDefaultInstance().getDisplayName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* The display name of the Azure subscription.
*
*
* string display_name = 2;
*
* @param value The bytes for displayName to set.
* @return This builder for chaining.
*/
public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
displayName_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription)
private static final com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription();
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AzureSubscription parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AzureResourceGroupOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return The name.
*/
java.lang.String getName();
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
com.google.protobuf.ByteString getNameBytes();
}
/**
*
*
*
* Represents an Azure resource group.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup}
*/
public static final class AzureResourceGroup extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)
AzureResourceGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use AzureResourceGroup.newBuilder() to construct.
private AzureResourceGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AzureResourceGroup() {
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AzureResourceGroup();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureResourceGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureResourceGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder.class);
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @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;
}
}
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(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup other =
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup) obj;
if (!getName().equals(other.getName())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Represents an Azure resource group.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureResourceGroup_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureResourceGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.class,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder.class);
}
// Construct using
// com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_AzureResourceGroup_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup build() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup buildPartial() {
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup result =
new com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup) {
return mergeFrom(
(com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup other) {
if (other
== com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* The name of the Azure resource group. This is not a UUID.
*
*
* string name = 1;
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup)
private static final com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup();
}
public static com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AzureResourceGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int MANAGEMENT_GROUPS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List
managementGroups_;
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
@java.lang.Override
public java.util.List
getManagementGroupsList() {
return managementGroups_;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
@java.lang.Override
public java.util.List<
? extends com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder>
getManagementGroupsOrBuilderList() {
return managementGroups_;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
@java.lang.Override
public int getManagementGroupsCount() {
return managementGroups_.size();
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup getManagementGroups(
int index) {
return managementGroups_.get(index);
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder
getManagementGroupsOrBuilder(int index) {
return managementGroups_.get(index);
}
public static final int SUBSCRIPTION_FIELD_NUMBER = 2;
private com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription_;
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
* @return Whether the subscription field is set.
*/
@java.lang.Override
public boolean hasSubscription() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
* @return The subscription.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription getSubscription() {
return subscription_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.getDefaultInstance()
: subscription_;
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder
getSubscriptionOrBuilder() {
return subscription_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.getDefaultInstance()
: subscription_;
}
public static final int RESOURCE_GROUP_FIELD_NUMBER = 3;
private com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resourceGroup_;
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*
* @return Whether the resourceGroup field is set.
*/
@java.lang.Override
public boolean hasResourceGroup() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*
* @return The resourceGroup.
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup getResourceGroup() {
return resourceGroup_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.getDefaultInstance()
: resourceGroup_;
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder
getResourceGroupOrBuilder() {
return resourceGroup_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.getDefaultInstance()
: resourceGroup_;
}
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 < managementGroups_.size(); i++) {
output.writeMessage(1, managementGroups_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getSubscription());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getResourceGroup());
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < managementGroups_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, managementGroups_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getSubscription());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getResourceGroup());
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.securitycenter.v2.AzureMetadata)) {
return super.equals(obj);
}
com.google.cloud.securitycenter.v2.AzureMetadata other =
(com.google.cloud.securitycenter.v2.AzureMetadata) obj;
if (!getManagementGroupsList().equals(other.getManagementGroupsList())) return false;
if (hasSubscription() != other.hasSubscription()) return false;
if (hasSubscription()) {
if (!getSubscription().equals(other.getSubscription())) return false;
}
if (hasResourceGroup() != other.hasResourceGroup()) return false;
if (hasResourceGroup()) {
if (!getResourceGroup().equals(other.getResourceGroup())) return false;
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getManagementGroupsCount() > 0) {
hash = (37 * hash) + MANAGEMENT_GROUPS_FIELD_NUMBER;
hash = (53 * hash) + getManagementGroupsList().hashCode();
}
if (hasSubscription()) {
hash = (37 * hash) + SUBSCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getSubscription().hashCode();
}
if (hasResourceGroup()) {
hash = (37 * hash) + RESOURCE_GROUP_FIELD_NUMBER;
hash = (53 * hash) + getResourceGroup().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.securitycenter.v2.AzureMetadata parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.google.cloud.securitycenter.v2.AzureMetadata 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;
}
/**
*
*
*
* Azure metadata associated with the resource, only applicable if the finding's
* cloud provider is Microsoft Azure.
*
*
* Protobuf type {@code google.cloud.securitycenter.v2.AzureMetadata}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.securitycenter.v2.AzureMetadata)
com.google.cloud.securitycenter.v2.AzureMetadataOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.securitycenter.v2.AzureMetadata.class,
com.google.cloud.securitycenter.v2.AzureMetadata.Builder.class);
}
// Construct using com.google.cloud.securitycenter.v2.AzureMetadata.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getManagementGroupsFieldBuilder();
getSubscriptionFieldBuilder();
getResourceGroupFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (managementGroupsBuilder_ == null) {
managementGroups_ = java.util.Collections.emptyList();
} else {
managementGroups_ = null;
managementGroupsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
subscription_ = null;
if (subscriptionBuilder_ != null) {
subscriptionBuilder_.dispose();
subscriptionBuilder_ = null;
}
resourceGroup_ = null;
if (resourceGroupBuilder_ != null) {
resourceGroupBuilder_.dispose();
resourceGroupBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.securitycenter.v2.ResourceProto
.internal_static_google_cloud_securitycenter_v2_AzureMetadata_descriptor;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata getDefaultInstanceForType() {
return com.google.cloud.securitycenter.v2.AzureMetadata.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata build() {
com.google.cloud.securitycenter.v2.AzureMetadata result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata buildPartial() {
com.google.cloud.securitycenter.v2.AzureMetadata result =
new com.google.cloud.securitycenter.v2.AzureMetadata(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.securitycenter.v2.AzureMetadata result) {
if (managementGroupsBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
managementGroups_ = java.util.Collections.unmodifiableList(managementGroups_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.managementGroups_ = managementGroups_;
} else {
result.managementGroups_ = managementGroupsBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.securitycenter.v2.AzureMetadata result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.subscription_ =
subscriptionBuilder_ == null ? subscription_ : subscriptionBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.resourceGroup_ =
resourceGroupBuilder_ == null ? resourceGroup_ : resourceGroupBuilder_.build();
to_bitField0_ |= 0x00000002;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.securitycenter.v2.AzureMetadata) {
return mergeFrom((com.google.cloud.securitycenter.v2.AzureMetadata) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.securitycenter.v2.AzureMetadata other) {
if (other == com.google.cloud.securitycenter.v2.AzureMetadata.getDefaultInstance())
return this;
if (managementGroupsBuilder_ == null) {
if (!other.managementGroups_.isEmpty()) {
if (managementGroups_.isEmpty()) {
managementGroups_ = other.managementGroups_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureManagementGroupsIsMutable();
managementGroups_.addAll(other.managementGroups_);
}
onChanged();
}
} else {
if (!other.managementGroups_.isEmpty()) {
if (managementGroupsBuilder_.isEmpty()) {
managementGroupsBuilder_.dispose();
managementGroupsBuilder_ = null;
managementGroups_ = other.managementGroups_;
bitField0_ = (bitField0_ & ~0x00000001);
managementGroupsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getManagementGroupsFieldBuilder()
: null;
} else {
managementGroupsBuilder_.addAllMessages(other.managementGroups_);
}
}
}
if (other.hasSubscription()) {
mergeSubscription(other.getSubscription());
}
if (other.hasResourceGroup()) {
mergeResourceGroup(other.getResourceGroup());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup m =
input.readMessage(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
.parser(),
extensionRegistry);
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
managementGroups_.add(m);
} else {
managementGroupsBuilder_.addMessage(m);
}
break;
} // case 10
case 18:
{
input.readMessage(getSubscriptionFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
input.readMessage(getResourceGroupFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 26
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.util.List
managementGroups_ = java.util.Collections.emptyList();
private void ensureManagementGroupsIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
managementGroups_ =
new java.util.ArrayList<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup>(
managementGroups_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder>
managementGroupsBuilder_;
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public java.util.List
getManagementGroupsList() {
if (managementGroupsBuilder_ == null) {
return java.util.Collections.unmodifiableList(managementGroups_);
} else {
return managementGroupsBuilder_.getMessageList();
}
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public int getManagementGroupsCount() {
if (managementGroupsBuilder_ == null) {
return managementGroups_.size();
} else {
return managementGroupsBuilder_.getCount();
}
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
getManagementGroups(int index) {
if (managementGroupsBuilder_ == null) {
return managementGroups_.get(index);
} else {
return managementGroupsBuilder_.getMessage(index);
}
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder setManagementGroups(
int index, com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup value) {
if (managementGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureManagementGroupsIsMutable();
managementGroups_.set(index, value);
onChanged();
} else {
managementGroupsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder setManagementGroups(
int index,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
builderForValue) {
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
managementGroups_.set(index, builderForValue.build());
onChanged();
} else {
managementGroupsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder addManagementGroups(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup value) {
if (managementGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureManagementGroupsIsMutable();
managementGroups_.add(value);
onChanged();
} else {
managementGroupsBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder addManagementGroups(
int index, com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup value) {
if (managementGroupsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureManagementGroupsIsMutable();
managementGroups_.add(index, value);
onChanged();
} else {
managementGroupsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder addManagementGroups(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
builderForValue) {
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
managementGroups_.add(builderForValue.build());
onChanged();
} else {
managementGroupsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder addManagementGroups(
int index,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
builderForValue) {
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
managementGroups_.add(index, builderForValue.build());
onChanged();
} else {
managementGroupsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder addAllManagementGroups(
java.lang.Iterable<
? extends com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup>
values) {
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, managementGroups_);
onChanged();
} else {
managementGroupsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder clearManagementGroups() {
if (managementGroupsBuilder_ == null) {
managementGroups_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
managementGroupsBuilder_.clear();
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public Builder removeManagementGroups(int index) {
if (managementGroupsBuilder_ == null) {
ensureManagementGroupsIsMutable();
managementGroups_.remove(index);
onChanged();
} else {
managementGroupsBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
getManagementGroupsBuilder(int index) {
return getManagementGroupsFieldBuilder().getBuilder(index);
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder
getManagementGroupsOrBuilder(int index) {
if (managementGroupsBuilder_ == null) {
return managementGroups_.get(index);
} else {
return managementGroupsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public java.util.List<
? extends
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder>
getManagementGroupsOrBuilderList() {
if (managementGroupsBuilder_ != null) {
return managementGroupsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(managementGroups_);
}
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
addManagementGroupsBuilder() {
return getManagementGroupsFieldBuilder()
.addBuilder(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
.getDefaultInstance());
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder
addManagementGroupsBuilder(int index) {
return getManagementGroupsFieldBuilder()
.addBuilder(
index,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup
.getDefaultInstance());
}
/**
*
*
*
* A list of Azure management groups associated with the resource, ordered
* from lowest level (closest to the subscription) to highest level.
*
*
*
* repeated .google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup management_groups = 1;
*
*/
public java.util.List<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder>
getManagementGroupsBuilderList() {
return getManagementGroupsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder>
getManagementGroupsFieldBuilder() {
if (managementGroupsBuilder_ == null) {
managementGroupsBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureManagementGroupOrBuilder>(
managementGroups_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
managementGroups_ = null;
}
return managementGroupsBuilder_;
}
private com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder>
subscriptionBuilder_;
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*
* @return Whether the subscription field is set.
*/
public boolean hasSubscription() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*
* @return The subscription.
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription getSubscription() {
if (subscriptionBuilder_ == null) {
return subscription_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
.getDefaultInstance()
: subscription_;
} else {
return subscriptionBuilder_.getMessage();
}
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public Builder setSubscription(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription value) {
if (subscriptionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
subscription_ = value;
} else {
subscriptionBuilder_.setMessage(value);
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public Builder setSubscription(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder
builderForValue) {
if (subscriptionBuilder_ == null) {
subscription_ = builderForValue.build();
} else {
subscriptionBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public Builder mergeSubscription(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription value) {
if (subscriptionBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)
&& subscription_ != null
&& subscription_
!= com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
.getDefaultInstance()) {
getSubscriptionBuilder().mergeFrom(value);
} else {
subscription_ = value;
}
} else {
subscriptionBuilder_.mergeFrom(value);
}
if (subscription_ != null) {
bitField0_ |= 0x00000002;
onChanged();
}
return this;
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public Builder clearSubscription() {
bitField0_ = (bitField0_ & ~0x00000002);
subscription_ = null;
if (subscriptionBuilder_ != null) {
subscriptionBuilder_.dispose();
subscriptionBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder
getSubscriptionBuilder() {
bitField0_ |= 0x00000002;
onChanged();
return getSubscriptionFieldBuilder().getBuilder();
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder
getSubscriptionOrBuilder() {
if (subscriptionBuilder_ != null) {
return subscriptionBuilder_.getMessageOrBuilder();
} else {
return subscription_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription
.getDefaultInstance()
: subscription_;
}
}
/**
*
*
*
* The Azure subscription associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription subscription = 2;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder>
getSubscriptionFieldBuilder() {
if (subscriptionBuilder_ == null) {
subscriptionBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscription.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureSubscriptionOrBuilder>(
getSubscription(), getParentForChildren(), isClean());
subscription_ = null;
}
return subscriptionBuilder_;
}
private com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resourceGroup_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder>
resourceGroupBuilder_;
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*
* @return Whether the resourceGroup field is set.
*/
public boolean hasResourceGroup() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*
* @return The resourceGroup.
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup getResourceGroup() {
if (resourceGroupBuilder_ == null) {
return resourceGroup_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
.getDefaultInstance()
: resourceGroup_;
} else {
return resourceGroupBuilder_.getMessage();
}
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public Builder setResourceGroup(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup value) {
if (resourceGroupBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resourceGroup_ = value;
} else {
resourceGroupBuilder_.setMessage(value);
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public Builder setResourceGroup(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder
builderForValue) {
if (resourceGroupBuilder_ == null) {
resourceGroup_ = builderForValue.build();
} else {
resourceGroupBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public Builder mergeResourceGroup(
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup value) {
if (resourceGroupBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)
&& resourceGroup_ != null
&& resourceGroup_
!= com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
.getDefaultInstance()) {
getResourceGroupBuilder().mergeFrom(value);
} else {
resourceGroup_ = value;
}
} else {
resourceGroupBuilder_.mergeFrom(value);
}
if (resourceGroup_ != null) {
bitField0_ |= 0x00000004;
onChanged();
}
return this;
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public Builder clearResourceGroup() {
bitField0_ = (bitField0_ & ~0x00000004);
resourceGroup_ = null;
if (resourceGroupBuilder_ != null) {
resourceGroupBuilder_.dispose();
resourceGroupBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder
getResourceGroupBuilder() {
bitField0_ |= 0x00000004;
onChanged();
return getResourceGroupFieldBuilder().getBuilder();
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
public com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder
getResourceGroupOrBuilder() {
if (resourceGroupBuilder_ != null) {
return resourceGroupBuilder_.getMessageOrBuilder();
} else {
return resourceGroup_ == null
? com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup
.getDefaultInstance()
: resourceGroup_;
}
}
/**
*
*
*
* The Azure resource group associated with the resource.
*
*
* .google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup resource_group = 3;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder>
getResourceGroupFieldBuilder() {
if (resourceGroupBuilder_ == null) {
resourceGroupBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroup.Builder,
com.google.cloud.securitycenter.v2.AzureMetadata.AzureResourceGroupOrBuilder>(
getResourceGroup(), getParentForChildren(), isClean());
resourceGroup_ = null;
}
return resourceGroupBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.securitycenter.v2.AzureMetadata)
}
// @@protoc_insertion_point(class_scope:google.cloud.securitycenter.v2.AzureMetadata)
private static final com.google.cloud.securitycenter.v2.AzureMetadata DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.securitycenter.v2.AzureMetadata();
}
public static com.google.cloud.securitycenter.v2.AzureMetadata getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AzureMetadata parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.securitycenter.v2.AzureMetadata getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy