com.amazonaws.services.securitylake.model.HttpsNotificationConfiguration Maven / Gradle / Ivy
/*
* Copyright 2019-2024 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.
*/
package com.amazonaws.services.securitylake.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The configurations for HTTPS subscriber notification.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class HttpsNotificationConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* The key name for the notification subscription.
*
*/
private String authorizationApiKeyName;
/**
*
* The key value for the notification subscription.
*
*/
private String authorizationApiKeyValue;
/**
*
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate this
* field.
*
*/
private String endpoint;
/**
*
* The HTTPS method used for the notification subscription.
*
*/
private String httpMethod;
/**
*
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing data
* access and Amazon Web Services
* Managed Policies in the Amazon Security Lake User Guide.
*
*/
private String targetRoleArn;
/**
*
* The key name for the notification subscription.
*
*
* @param authorizationApiKeyName
* The key name for the notification subscription.
*/
public void setAuthorizationApiKeyName(String authorizationApiKeyName) {
this.authorizationApiKeyName = authorizationApiKeyName;
}
/**
*
* The key name for the notification subscription.
*
*
* @return The key name for the notification subscription.
*/
public String getAuthorizationApiKeyName() {
return this.authorizationApiKeyName;
}
/**
*
* The key name for the notification subscription.
*
*
* @param authorizationApiKeyName
* The key name for the notification subscription.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HttpsNotificationConfiguration withAuthorizationApiKeyName(String authorizationApiKeyName) {
setAuthorizationApiKeyName(authorizationApiKeyName);
return this;
}
/**
*
* The key value for the notification subscription.
*
*
* @param authorizationApiKeyValue
* The key value for the notification subscription.
*/
public void setAuthorizationApiKeyValue(String authorizationApiKeyValue) {
this.authorizationApiKeyValue = authorizationApiKeyValue;
}
/**
*
* The key value for the notification subscription.
*
*
* @return The key value for the notification subscription.
*/
public String getAuthorizationApiKeyValue() {
return this.authorizationApiKeyValue;
}
/**
*
* The key value for the notification subscription.
*
*
* @param authorizationApiKeyValue
* The key value for the notification subscription.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HttpsNotificationConfiguration withAuthorizationApiKeyValue(String authorizationApiKeyValue) {
setAuthorizationApiKeyValue(authorizationApiKeyValue);
return this;
}
/**
*
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate this
* field.
*
*
* @param endpoint
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate
* this field.
*/
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
/**
*
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate this
* field.
*
*
* @return The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate
* this field.
*/
public String getEndpoint() {
return this.endpoint;
}
/**
*
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate this
* field.
*
*
* @param endpoint
* The subscription endpoint in Security Lake. If you prefer notification with an HTTPs endpoint, populate
* this field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HttpsNotificationConfiguration withEndpoint(String endpoint) {
setEndpoint(endpoint);
return this;
}
/**
*
* The HTTPS method used for the notification subscription.
*
*
* @param httpMethod
* The HTTPS method used for the notification subscription.
* @see HttpMethod
*/
public void setHttpMethod(String httpMethod) {
this.httpMethod = httpMethod;
}
/**
*
* The HTTPS method used for the notification subscription.
*
*
* @return The HTTPS method used for the notification subscription.
* @see HttpMethod
*/
public String getHttpMethod() {
return this.httpMethod;
}
/**
*
* The HTTPS method used for the notification subscription.
*
*
* @param httpMethod
* The HTTPS method used for the notification subscription.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpMethod
*/
public HttpsNotificationConfiguration withHttpMethod(String httpMethod) {
setHttpMethod(httpMethod);
return this;
}
/**
*
* The HTTPS method used for the notification subscription.
*
*
* @param httpMethod
* The HTTPS method used for the notification subscription.
* @return Returns a reference to this object so that method calls can be chained together.
* @see HttpMethod
*/
public HttpsNotificationConfiguration withHttpMethod(HttpMethod httpMethod) {
this.httpMethod = httpMethod.toString();
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing data
* access and Amazon Web Services
* Managed Policies in the Amazon Security Lake User Guide.
*
*
* @param targetRoleArn
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing
* data access and Amazon Web
* Services Managed Policies in the Amazon Security Lake User Guide.
*/
public void setTargetRoleArn(String targetRoleArn) {
this.targetRoleArn = targetRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing data
* access and Amazon Web Services
* Managed Policies in the Amazon Security Lake User Guide.
*
*
* @return The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing
* data access and Amazon Web
* Services Managed Policies in the Amazon Security Lake User Guide.
*/
public String getTargetRoleArn() {
return this.targetRoleArn;
}
/**
*
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing data
* access and Amazon Web Services
* Managed Policies in the Amazon Security Lake User Guide.
*
*
* @param targetRoleArn
* The Amazon Resource Name (ARN) of the EventBridge API destinations IAM role that you created. For more
* information about ARNs and how to use them in policies, see Managing
* data access and Amazon Web
* Services Managed Policies in the Amazon Security Lake User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public HttpsNotificationConfiguration withTargetRoleArn(String targetRoleArn) {
setTargetRoleArn(targetRoleArn);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getAuthorizationApiKeyName() != null)
sb.append("AuthorizationApiKeyName: ").append(getAuthorizationApiKeyName()).append(",");
if (getAuthorizationApiKeyValue() != null)
sb.append("AuthorizationApiKeyValue: ").append(getAuthorizationApiKeyValue()).append(",");
if (getEndpoint() != null)
sb.append("Endpoint: ").append(getEndpoint()).append(",");
if (getHttpMethod() != null)
sb.append("HttpMethod: ").append(getHttpMethod()).append(",");
if (getTargetRoleArn() != null)
sb.append("TargetRoleArn: ").append(getTargetRoleArn());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof HttpsNotificationConfiguration == false)
return false;
HttpsNotificationConfiguration other = (HttpsNotificationConfiguration) obj;
if (other.getAuthorizationApiKeyName() == null ^ this.getAuthorizationApiKeyName() == null)
return false;
if (other.getAuthorizationApiKeyName() != null && other.getAuthorizationApiKeyName().equals(this.getAuthorizationApiKeyName()) == false)
return false;
if (other.getAuthorizationApiKeyValue() == null ^ this.getAuthorizationApiKeyValue() == null)
return false;
if (other.getAuthorizationApiKeyValue() != null && other.getAuthorizationApiKeyValue().equals(this.getAuthorizationApiKeyValue()) == false)
return false;
if (other.getEndpoint() == null ^ this.getEndpoint() == null)
return false;
if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false)
return false;
if (other.getHttpMethod() == null ^ this.getHttpMethod() == null)
return false;
if (other.getHttpMethod() != null && other.getHttpMethod().equals(this.getHttpMethod()) == false)
return false;
if (other.getTargetRoleArn() == null ^ this.getTargetRoleArn() == null)
return false;
if (other.getTargetRoleArn() != null && other.getTargetRoleArn().equals(this.getTargetRoleArn()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAuthorizationApiKeyName() == null) ? 0 : getAuthorizationApiKeyName().hashCode());
hashCode = prime * hashCode + ((getAuthorizationApiKeyValue() == null) ? 0 : getAuthorizationApiKeyValue().hashCode());
hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode());
hashCode = prime * hashCode + ((getHttpMethod() == null) ? 0 : getHttpMethod().hashCode());
hashCode = prime * hashCode + ((getTargetRoleArn() == null) ? 0 : getTargetRoleArn().hashCode());
return hashCode;
}
@Override
public HttpsNotificationConfiguration clone() {
try {
return (HttpsNotificationConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.securitylake.model.transform.HttpsNotificationConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}