All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ecr.model.RepositoryScanningConfiguration Maven / Gradle / Ivy

Go to download

The AWS Java SDK for the Amazon EC2 Container Registry holds the client classes that are used for communicating with the Amazon EC2 Container Registry Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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.ecr.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* The details of the scanning configuration for a repository. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class RepositoryScanningConfiguration implements Serializable, Cloneable, StructuredPojo { /** *

* The ARN of the repository. *

*/ private String repositoryArn; /** *

* The name of the repository. *

*/ private String repositoryName; /** *

* Whether or not scan on push is configured for the repository. *

*/ private Boolean scanOnPush; /** *

* The scan frequency for the repository. *

*/ private String scanFrequency; /** *

* The scan filters applied to the repository. *

*/ private java.util.List appliedScanFilters; /** *

* The ARN of the repository. *

* * @param repositoryArn * The ARN of the repository. */ public void setRepositoryArn(String repositoryArn) { this.repositoryArn = repositoryArn; } /** *

* The ARN of the repository. *

* * @return The ARN of the repository. */ public String getRepositoryArn() { return this.repositoryArn; } /** *

* The ARN of the repository. *

* * @param repositoryArn * The ARN of the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryScanningConfiguration withRepositoryArn(String repositoryArn) { setRepositoryArn(repositoryArn); return this; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. */ public void setRepositoryName(String repositoryName) { this.repositoryName = repositoryName; } /** *

* The name of the repository. *

* * @return The name of the repository. */ public String getRepositoryName() { return this.repositoryName; } /** *

* The name of the repository. *

* * @param repositoryName * The name of the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryScanningConfiguration withRepositoryName(String repositoryName) { setRepositoryName(repositoryName); return this; } /** *

* Whether or not scan on push is configured for the repository. *

* * @param scanOnPush * Whether or not scan on push is configured for the repository. */ public void setScanOnPush(Boolean scanOnPush) { this.scanOnPush = scanOnPush; } /** *

* Whether or not scan on push is configured for the repository. *

* * @return Whether or not scan on push is configured for the repository. */ public Boolean getScanOnPush() { return this.scanOnPush; } /** *

* Whether or not scan on push is configured for the repository. *

* * @param scanOnPush * Whether or not scan on push is configured for the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryScanningConfiguration withScanOnPush(Boolean scanOnPush) { setScanOnPush(scanOnPush); return this; } /** *

* Whether or not scan on push is configured for the repository. *

* * @return Whether or not scan on push is configured for the repository. */ public Boolean isScanOnPush() { return this.scanOnPush; } /** *

* The scan frequency for the repository. *

* * @param scanFrequency * The scan frequency for the repository. * @see ScanFrequency */ public void setScanFrequency(String scanFrequency) { this.scanFrequency = scanFrequency; } /** *

* The scan frequency for the repository. *

* * @return The scan frequency for the repository. * @see ScanFrequency */ public String getScanFrequency() { return this.scanFrequency; } /** *

* The scan frequency for the repository. *

* * @param scanFrequency * The scan frequency for the repository. * @return Returns a reference to this object so that method calls can be chained together. * @see ScanFrequency */ public RepositoryScanningConfiguration withScanFrequency(String scanFrequency) { setScanFrequency(scanFrequency); return this; } /** *

* The scan frequency for the repository. *

* * @param scanFrequency * The scan frequency for the repository. * @return Returns a reference to this object so that method calls can be chained together. * @see ScanFrequency */ public RepositoryScanningConfiguration withScanFrequency(ScanFrequency scanFrequency) { this.scanFrequency = scanFrequency.toString(); return this; } /** *

* The scan filters applied to the repository. *

* * @return The scan filters applied to the repository. */ public java.util.List getAppliedScanFilters() { return appliedScanFilters; } /** *

* The scan filters applied to the repository. *

* * @param appliedScanFilters * The scan filters applied to the repository. */ public void setAppliedScanFilters(java.util.Collection appliedScanFilters) { if (appliedScanFilters == null) { this.appliedScanFilters = null; return; } this.appliedScanFilters = new java.util.ArrayList(appliedScanFilters); } /** *

* The scan filters applied to the repository. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setAppliedScanFilters(java.util.Collection)} or {@link #withAppliedScanFilters(java.util.Collection)} if * you want to override the existing values. *

* * @param appliedScanFilters * The scan filters applied to the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryScanningConfiguration withAppliedScanFilters(ScanningRepositoryFilter... appliedScanFilters) { if (this.appliedScanFilters == null) { setAppliedScanFilters(new java.util.ArrayList(appliedScanFilters.length)); } for (ScanningRepositoryFilter ele : appliedScanFilters) { this.appliedScanFilters.add(ele); } return this; } /** *

* The scan filters applied to the repository. *

* * @param appliedScanFilters * The scan filters applied to the repository. * @return Returns a reference to this object so that method calls can be chained together. */ public RepositoryScanningConfiguration withAppliedScanFilters(java.util.Collection appliedScanFilters) { setAppliedScanFilters(appliedScanFilters); 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 (getRepositoryArn() != null) sb.append("RepositoryArn: ").append(getRepositoryArn()).append(","); if (getRepositoryName() != null) sb.append("RepositoryName: ").append(getRepositoryName()).append(","); if (getScanOnPush() != null) sb.append("ScanOnPush: ").append(getScanOnPush()).append(","); if (getScanFrequency() != null) sb.append("ScanFrequency: ").append(getScanFrequency()).append(","); if (getAppliedScanFilters() != null) sb.append("AppliedScanFilters: ").append(getAppliedScanFilters()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RepositoryScanningConfiguration == false) return false; RepositoryScanningConfiguration other = (RepositoryScanningConfiguration) obj; if (other.getRepositoryArn() == null ^ this.getRepositoryArn() == null) return false; if (other.getRepositoryArn() != null && other.getRepositoryArn().equals(this.getRepositoryArn()) == false) return false; if (other.getRepositoryName() == null ^ this.getRepositoryName() == null) return false; if (other.getRepositoryName() != null && other.getRepositoryName().equals(this.getRepositoryName()) == false) return false; if (other.getScanOnPush() == null ^ this.getScanOnPush() == null) return false; if (other.getScanOnPush() != null && other.getScanOnPush().equals(this.getScanOnPush()) == false) return false; if (other.getScanFrequency() == null ^ this.getScanFrequency() == null) return false; if (other.getScanFrequency() != null && other.getScanFrequency().equals(this.getScanFrequency()) == false) return false; if (other.getAppliedScanFilters() == null ^ this.getAppliedScanFilters() == null) return false; if (other.getAppliedScanFilters() != null && other.getAppliedScanFilters().equals(this.getAppliedScanFilters()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getRepositoryArn() == null) ? 0 : getRepositoryArn().hashCode()); hashCode = prime * hashCode + ((getRepositoryName() == null) ? 0 : getRepositoryName().hashCode()); hashCode = prime * hashCode + ((getScanOnPush() == null) ? 0 : getScanOnPush().hashCode()); hashCode = prime * hashCode + ((getScanFrequency() == null) ? 0 : getScanFrequency().hashCode()); hashCode = prime * hashCode + ((getAppliedScanFilters() == null) ? 0 : getAppliedScanFilters().hashCode()); return hashCode; } @Override public RepositoryScanningConfiguration clone() { try { return (RepositoryScanningConfiguration) 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.ecr.model.transform.RepositoryScanningConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy