/** * * * <pre> * The authentication information. Optional when creating an HTTP check; * defaults to empty. * </pre> * * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * </code> */ public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getAuthInfo() { if (authInfoBuilder_ == null) { return authInfo_ == null ? com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication .getDefaultInstance() : authInfo_; } else { return authInfoBuilder_.getMessage(); } } /**
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USERNAME_FIELD_NUMBER; hash = (53 * hash) + getUsername().hashCode(); hash = (37 * hash) + PASSWORD_FIELD_NUMBER; hash = (53 * hash) + getPassword().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUsernameBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, username_); } if (!getPasswordBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, password_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; }
@java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + USE_SSL_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getUseSsl()); hash = (37 * hash) + PATH_FIELD_NUMBER; hash = (53 * hash) + getPath().hashCode(); hash = (37 * hash) + PORT_FIELD_NUMBER; hash = (53 * hash) + getPort(); if (hasAuthInfo()) { hash = (37 * hash) + AUTH_INFO_FIELD_NUMBER; hash = (53 * hash) + getAuthInfo().hashCode(); } hash = (37 * hash) + MASK_HEADERS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMaskHeaders()); if (!internalGetHeaders().getMap().isEmpty()) { hash = (37 * hash) + HEADERS_FIELD_NUMBER; hash = (53 * hash) + internalGetHeaders().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.UptimeCheckConfig.HttpCheck)) { return super.equals(obj); } com.google.monitoring.v3.UptimeCheckConfig.HttpCheck other = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck) obj; boolean result = true; result = result && (getUseSsl() == other.getUseSsl()); result = result && getPath().equals(other.getPath()); result = result && (getPort() == other.getPort()); result = result && (hasAuthInfo() == other.hasAuthInfo()); if (hasAuthInfo()) { result = result && getAuthInfo().equals(other.getAuthInfo()); } result = result && (getMaskHeaders() == other.getMaskHeaders()); result = result && internalGetHeaders().equals(other.internalGetHeaders()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The authentication information. Optional when creating an HTTP check; * defaults to empty. * </pre> * * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * </code> */ public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthenticationOrBuilder getAuthInfoOrBuilder() { if (authInfoBuilder_ != null) { return authInfoBuilder_.getMessageOrBuilder(); } else { return authInfo_ == null ? com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication .getDefaultInstance() : authInfo_; } } /**
/** * * * <pre> * The authentication information. Optional when creating an HTTP check; * defaults to empty. * </pre> * * <code>.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication auth_info = 4; * </code> */ public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getAuthInfo() { return authInfo_ == null ? com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication .getDefaultInstance() : authInfo_; } /**
public Builder mergeFrom( com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication other) { if (other == com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication .getDefaultInstance()) return this; if (!other.getUsername().isEmpty()) { username_ = other.username_; onChanged(); } if (!other.getPassword().isEmpty()) { password_ = other.password_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication)) { return super.equals(obj); } com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication other = (com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication) obj; boolean result = true; result = result && getUsername().equals(other.getUsername()); result = result && getPassword().equals(other.getPassword()); result = result && unknownFields.equals(other.unknownFields); return result; }
/** * * * <pre> * The password to authenticate. * </pre> * * <code>string password = 2;</code> */ public Builder clearPassword() { password_ = getDefaultInstance().getPassword(); onChanged(); return this; } /**
/** * * * <pre> * The username to authenticate. * </pre> * * <code>string username = 1;</code> */ public Builder clearUsername() { username_ = getDefaultInstance().getUsername(); onChanged(); return this; } /**
@java.lang.Override public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication build() { com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; }
@java.lang.Override public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication getDefaultInstanceForType() { return com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication .getDefaultInstance(); }
@java.lang.Override public com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication buildPartial() { com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication result = new com.google.monitoring.v3.UptimeCheckConfig.HttpCheck.BasicAuthentication(this); result.username_ = username_; result.password_ = password_; onBuilt(); return result; }
@java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUsernameBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, username_); } if (!getPasswordBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, password_); } unknownFields.writeTo(output); }