com.amazonaws.services.codebuild.model.LogsLocation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-codebuild Show documentation
/*
* 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.codebuild.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Information about build logs in CloudWatch Logs.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class LogsLocation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name of the CloudWatch Logs group for the build logs.
*
*/
private String groupName;
/**
*
* The name of the CloudWatch Logs stream for the build logs.
*
*/
private String streamName;
/**
*
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING phase of
* a build and the deeplink
will not be valid until it is created.
*
*/
private String deepLink;
/**
*
* The URL to a build log in an S3 bucket.
*
*/
private String s3DeepLink;
/**
*
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
.
* The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid
* until it is created. For more information, see Resources Defined by CloudWatch Logs.
*
*/
private String cloudWatchLogsArn;
/**
*
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*
*/
private String s3LogsArn;
/**
*
* Information about CloudWatch Logs for a build project.
*
*/
private CloudWatchLogsConfig cloudWatchLogs;
/**
*
* Information about S3 logs for a build project.
*
*/
private S3LogsConfig s3Logs;
/**
*
* The name of the CloudWatch Logs group for the build logs.
*
*
* @param groupName
* The name of the CloudWatch Logs group for the build logs.
*/
public void setGroupName(String groupName) {
this.groupName = groupName;
}
/**
*
* The name of the CloudWatch Logs group for the build logs.
*
*
* @return The name of the CloudWatch Logs group for the build logs.
*/
public String getGroupName() {
return this.groupName;
}
/**
*
* The name of the CloudWatch Logs group for the build logs.
*
*
* @param groupName
* The name of the CloudWatch Logs group for the build logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withGroupName(String groupName) {
setGroupName(groupName);
return this;
}
/**
*
* The name of the CloudWatch Logs stream for the build logs.
*
*
* @param streamName
* The name of the CloudWatch Logs stream for the build logs.
*/
public void setStreamName(String streamName) {
this.streamName = streamName;
}
/**
*
* The name of the CloudWatch Logs stream for the build logs.
*
*
* @return The name of the CloudWatch Logs stream for the build logs.
*/
public String getStreamName() {
return this.streamName;
}
/**
*
* The name of the CloudWatch Logs stream for the build logs.
*
*
* @param streamName
* The name of the CloudWatch Logs stream for the build logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withStreamName(String streamName) {
setStreamName(streamName);
return this;
}
/**
*
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING phase of
* a build and the deeplink
will not be valid until it is created.
*
*
* @param deepLink
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING
* phase of a build and the deeplink
will not be valid until it is created.
*/
public void setDeepLink(String deepLink) {
this.deepLink = deepLink;
}
/**
*
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING phase of
* a build and the deeplink
will not be valid until it is created.
*
*
* @return The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING
* phase of a build and the deeplink
will not be valid until it is created.
*/
public String getDeepLink() {
return this.deepLink;
}
/**
*
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING phase of
* a build and the deeplink
will not be valid until it is created.
*
*
* @param deepLink
* The URL to an individual build log in CloudWatch Logs. The log stream is created during the PROVISIONING
* phase of a build and the deeplink
will not be valid until it is created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withDeepLink(String deepLink) {
setDeepLink(deepLink);
return this;
}
/**
*
* The URL to a build log in an S3 bucket.
*
*
* @param s3DeepLink
* The URL to a build log in an S3 bucket.
*/
public void setS3DeepLink(String s3DeepLink) {
this.s3DeepLink = s3DeepLink;
}
/**
*
* The URL to a build log in an S3 bucket.
*
*
* @return The URL to a build log in an S3 bucket.
*/
public String getS3DeepLink() {
return this.s3DeepLink;
}
/**
*
* The URL to a build log in an S3 bucket.
*
*
* @param s3DeepLink
* The URL to a build log in an S3 bucket.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withS3DeepLink(String s3DeepLink) {
setS3DeepLink(s3DeepLink);
return this;
}
/**
*
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
.
* The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid
* until it is created. For more information, see Resources Defined by CloudWatch Logs.
*
*
* @param cloudWatchLogsArn
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
* . The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be
* valid until it is created. For more information, see Resources Defined by CloudWatch Logs.
*/
public void setCloudWatchLogsArn(String cloudWatchLogsArn) {
this.cloudWatchLogsArn = cloudWatchLogsArn;
}
/**
*
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
.
* The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid
* until it is created. For more information, see Resources Defined by CloudWatch Logs.
*
*
* @return The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
* . The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be
* valid until it is created. For more information, see Resources Defined by CloudWatch Logs.
*/
public String getCloudWatchLogsArn() {
return this.cloudWatchLogsArn;
}
/**
*
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
.
* The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be valid
* until it is created. For more information, see Resources Defined by CloudWatch Logs.
*
*
* @param cloudWatchLogsArn
* The ARN of the CloudWatch Logs stream for a build execution. Its format is
* arn:${Partition}:logs:${Region}:${Account}:log-group:${LogGroupName}:log-stream:${LogStreamName}
* . The CloudWatch Logs stream is created during the PROVISIONING phase of a build and the ARN will not be
* valid until it is created. For more information, see Resources Defined by CloudWatch Logs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withCloudWatchLogsArn(String cloudWatchLogsArn) {
setCloudWatchLogsArn(cloudWatchLogsArn);
return this;
}
/**
*
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*
*
* @param s3LogsArn
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*/
public void setS3LogsArn(String s3LogsArn) {
this.s3LogsArn = s3LogsArn;
}
/**
*
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*
*
* @return The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*/
public String getS3LogsArn() {
return this.s3LogsArn;
}
/**
*
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
*
*
* @param s3LogsArn
* The ARN of S3 logs for a build project. Its format is
* arn:${Partition}:s3:::${BucketName}/${ObjectName}
. For more information, see Resources Defined by Amazon S3.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withS3LogsArn(String s3LogsArn) {
setS3LogsArn(s3LogsArn);
return this;
}
/**
*
* Information about CloudWatch Logs for a build project.
*
*
* @param cloudWatchLogs
* Information about CloudWatch Logs for a build project.
*/
public void setCloudWatchLogs(CloudWatchLogsConfig cloudWatchLogs) {
this.cloudWatchLogs = cloudWatchLogs;
}
/**
*
* Information about CloudWatch Logs for a build project.
*
*
* @return Information about CloudWatch Logs for a build project.
*/
public CloudWatchLogsConfig getCloudWatchLogs() {
return this.cloudWatchLogs;
}
/**
*
* Information about CloudWatch Logs for a build project.
*
*
* @param cloudWatchLogs
* Information about CloudWatch Logs for a build project.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withCloudWatchLogs(CloudWatchLogsConfig cloudWatchLogs) {
setCloudWatchLogs(cloudWatchLogs);
return this;
}
/**
*
* Information about S3 logs for a build project.
*
*
* @param s3Logs
* Information about S3 logs for a build project.
*/
public void setS3Logs(S3LogsConfig s3Logs) {
this.s3Logs = s3Logs;
}
/**
*
* Information about S3 logs for a build project.
*
*
* @return Information about S3 logs for a build project.
*/
public S3LogsConfig getS3Logs() {
return this.s3Logs;
}
/**
*
* Information about S3 logs for a build project.
*
*
* @param s3Logs
* Information about S3 logs for a build project.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public LogsLocation withS3Logs(S3LogsConfig s3Logs) {
setS3Logs(s3Logs);
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 (getGroupName() != null)
sb.append("GroupName: ").append(getGroupName()).append(",");
if (getStreamName() != null)
sb.append("StreamName: ").append(getStreamName()).append(",");
if (getDeepLink() != null)
sb.append("DeepLink: ").append(getDeepLink()).append(",");
if (getS3DeepLink() != null)
sb.append("S3DeepLink: ").append(getS3DeepLink()).append(",");
if (getCloudWatchLogsArn() != null)
sb.append("CloudWatchLogsArn: ").append(getCloudWatchLogsArn()).append(",");
if (getS3LogsArn() != null)
sb.append("S3LogsArn: ").append(getS3LogsArn()).append(",");
if (getCloudWatchLogs() != null)
sb.append("CloudWatchLogs: ").append(getCloudWatchLogs()).append(",");
if (getS3Logs() != null)
sb.append("S3Logs: ").append(getS3Logs());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof LogsLocation == false)
return false;
LogsLocation other = (LogsLocation) obj;
if (other.getGroupName() == null ^ this.getGroupName() == null)
return false;
if (other.getGroupName() != null && other.getGroupName().equals(this.getGroupName()) == false)
return false;
if (other.getStreamName() == null ^ this.getStreamName() == null)
return false;
if (other.getStreamName() != null && other.getStreamName().equals(this.getStreamName()) == false)
return false;
if (other.getDeepLink() == null ^ this.getDeepLink() == null)
return false;
if (other.getDeepLink() != null && other.getDeepLink().equals(this.getDeepLink()) == false)
return false;
if (other.getS3DeepLink() == null ^ this.getS3DeepLink() == null)
return false;
if (other.getS3DeepLink() != null && other.getS3DeepLink().equals(this.getS3DeepLink()) == false)
return false;
if (other.getCloudWatchLogsArn() == null ^ this.getCloudWatchLogsArn() == null)
return false;
if (other.getCloudWatchLogsArn() != null && other.getCloudWatchLogsArn().equals(this.getCloudWatchLogsArn()) == false)
return false;
if (other.getS3LogsArn() == null ^ this.getS3LogsArn() == null)
return false;
if (other.getS3LogsArn() != null && other.getS3LogsArn().equals(this.getS3LogsArn()) == false)
return false;
if (other.getCloudWatchLogs() == null ^ this.getCloudWatchLogs() == null)
return false;
if (other.getCloudWatchLogs() != null && other.getCloudWatchLogs().equals(this.getCloudWatchLogs()) == false)
return false;
if (other.getS3Logs() == null ^ this.getS3Logs() == null)
return false;
if (other.getS3Logs() != null && other.getS3Logs().equals(this.getS3Logs()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
hashCode = prime * hashCode + ((getStreamName() == null) ? 0 : getStreamName().hashCode());
hashCode = prime * hashCode + ((getDeepLink() == null) ? 0 : getDeepLink().hashCode());
hashCode = prime * hashCode + ((getS3DeepLink() == null) ? 0 : getS3DeepLink().hashCode());
hashCode = prime * hashCode + ((getCloudWatchLogsArn() == null) ? 0 : getCloudWatchLogsArn().hashCode());
hashCode = prime * hashCode + ((getS3LogsArn() == null) ? 0 : getS3LogsArn().hashCode());
hashCode = prime * hashCode + ((getCloudWatchLogs() == null) ? 0 : getCloudWatchLogs().hashCode());
hashCode = prime * hashCode + ((getS3Logs() == null) ? 0 : getS3Logs().hashCode());
return hashCode;
}
@Override
public LogsLocation clone() {
try {
return (LogsLocation) 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.codebuild.model.transform.LogsLocationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}