public Builder mergeFrom(com.google.monitoring.v3.CreateGroupRequest other) { if (other == com.google.monitoring.v3.CreateGroupRequest.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; onChanged(); } if (other.hasGroup()) { mergeGroup(other.getGroup()); } if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder newBuilderForType() { return newBuilder(); }
@java.lang.Override public com.google.monitoring.v3.CreateGroupRequest buildPartial() { com.google.monitoring.v3.CreateGroupRequest result = new com.google.monitoring.v3.CreateGroupRequest(this); result.name_ = name_; if (groupBuilder_ == null) { result.group_ = group_; } else { result.group_ = groupBuilder_.build(); } result.validateOnly_ = validateOnly_; onBuilt(); return result; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.CreateGroupRequest)) { return super.equals(obj); } com.google.monitoring.v3.CreateGroupRequest other = (com.google.monitoring.v3.CreateGroupRequest) obj; boolean result = true; result = result && getName().equals(other.getName()); result = result && (hasGroup() == other.hasGroup()); if (hasGroup()) { result = result && getGroup().equals(other.getGroup()); } result = result && (getValidateOnly() == other.getValidateOnly()); result = result && unknownFields.equals(other.unknownFields); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (group_ != null) { output.writeMessage(2, getGroup()); } if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); } unknownFields.writeTo(output); }
/** * * * <pre> * The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. * </pre> * * <code>string name = 4;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
@java.lang.Override public com.google.monitoring.v3.CreateGroupRequest getDefaultInstanceForType() { return com.google.monitoring.v3.CreateGroupRequest.getDefaultInstance(); }
/** * * * <pre> * A group definition. It is an error to define the `name` field because * the system assigns the name. * </pre> * * <code>.google.monitoring.v3.Group group = 2;</code> */ public com.google.monitoring.v3.GroupOrBuilder getGroupOrBuilder() { return getGroup(); }
if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { done = true; } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable();
@java.lang.Override public com.google.monitoring.v3.CreateGroupRequest build() { com.google.monitoring.v3.CreateGroupRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
e).setUnfinishedMessage(this); } finally { makeExtensionsImmutable();
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (group_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getGroup()); } if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); } if (!getNameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
/** * <pre> * The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. * </pre> * * <code>optional string name = 4;</code> */ public Builder clearName() { name_ = getDefaultInstance().getName(); onChanged(); return this; } /**
.setRequestMarshaller( io.grpc.protobuf.ProtoUtils.marshaller( com.google.monitoring.v3.CreateGroupRequest.getDefaultInstance())) .setResponseMarshaller( io.grpc.protobuf.ProtoUtils.marshaller(
/** * <pre> * A group definition. It is an error to define the `name` field because * the system assigns the name. * </pre> * * <code>optional .google.monitoring.v3.Group group = 2;</code> */ public com.google.monitoring.v3.GroupOrBuilder getGroupOrBuilder() { return getGroup(); }
public com.google.monitoring.v3.CreateGroupRequest build() { com.google.monitoring.v3.CreateGroupRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@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(); if (hasGroup()) { hash = (37 * hash) + GROUP_FIELD_NUMBER; hash = (53 * hash) + getGroup().hashCode(); } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (group_ != null) { output.writeMessage(2, getGroup()); } if (validateOnly_ != false) { output.writeBool(3, validateOnly_); } if (!getNameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_); } }
/** * Creates a new group. * * <p>Sample code: * * <pre><code> * try (GroupServiceClient groupServiceClient = GroupServiceClient.create()) { * ProjectName name = ProjectName.of("[PROJECT]"); * Group group = Group.newBuilder().build(); * Group response = groupServiceClient.createGroup(name.toString(), group); * } * </code></pre> * * @param name The project in which to create the group. The format is * `"projects/{project_id_or_number}"`. * @param group A group definition. It is an error to define the `name` field because the system * assigns the name. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final Group createGroup(String name, Group group) { CreateGroupRequest request = CreateGroupRequest.newBuilder().setName(name).setGroup(group).build(); return createGroup(request); }