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

com.amazonaws.services.simplesystemsmanagement.model.BaselineOverride 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.simplesystemsmanagement.model;

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

/**
 * 

* Defines the basic information about a patch baseline override. *

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

* The operating system rule used by the patch baseline override. *

*/ private String operatingSystem; private PatchFilterGroup globalFilters; private PatchRuleGroup approvalRules; /** *

* A list of explicitly approved patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

*/ private com.amazonaws.internal.SdkInternalList approvedPatches; /** *

* Defines the compliance level for approved patches. When an approved patch is reported as missing, this value * describes the severity of the compliance violation. *

*/ private String approvedPatchesComplianceLevel; /** *

* A list of explicitly rejected patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

*/ private com.amazonaws.internal.SdkInternalList rejectedPatches; /** *

* The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can * be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it * as a dependency. *

*/ private String rejectedPatchesAction; /** *

* Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. *

*/ private Boolean approvedPatchesEnableNonSecurity; /** *

* Information about the patches to use to update the managed nodes, including target operating systems and source * repositories. Applies to Linux managed nodes only. *

*/ private com.amazonaws.internal.SdkInternalList sources; /** *

* The operating system rule used by the patch baseline override. *

* * @param operatingSystem * The operating system rule used by the patch baseline override. * @see OperatingSystem */ public void setOperatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; } /** *

* The operating system rule used by the patch baseline override. *

* * @return The operating system rule used by the patch baseline override. * @see OperatingSystem */ public String getOperatingSystem() { return this.operatingSystem; } /** *

* The operating system rule used by the patch baseline override. *

* * @param operatingSystem * The operating system rule used by the patch baseline override. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public BaselineOverride withOperatingSystem(String operatingSystem) { setOperatingSystem(operatingSystem); return this; } /** *

* The operating system rule used by the patch baseline override. *

* * @param operatingSystem * The operating system rule used by the patch baseline override. * @return Returns a reference to this object so that method calls can be chained together. * @see OperatingSystem */ public BaselineOverride withOperatingSystem(OperatingSystem operatingSystem) { this.operatingSystem = operatingSystem.toString(); return this; } /** * @param globalFilters */ public void setGlobalFilters(PatchFilterGroup globalFilters) { this.globalFilters = globalFilters; } /** * @return */ public PatchFilterGroup getGlobalFilters() { return this.globalFilters; } /** * @param globalFilters * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withGlobalFilters(PatchFilterGroup globalFilters) { setGlobalFilters(globalFilters); return this; } /** * @param approvalRules */ public void setApprovalRules(PatchRuleGroup approvalRules) { this.approvalRules = approvalRules; } /** * @return */ public PatchRuleGroup getApprovalRules() { return this.approvalRules; } /** * @param approvalRules * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withApprovalRules(PatchRuleGroup approvalRules) { setApprovalRules(approvalRules); return this; } /** *

* A list of explicitly approved patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @return A list of explicitly approved patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. */ public java.util.List getApprovedPatches() { if (approvedPatches == null) { approvedPatches = new com.amazonaws.internal.SdkInternalList(); } return approvedPatches; } /** *

* A list of explicitly approved patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @param approvedPatches * A list of explicitly approved patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. */ public void setApprovedPatches(java.util.Collection approvedPatches) { if (approvedPatches == null) { this.approvedPatches = null; return; } this.approvedPatches = new com.amazonaws.internal.SdkInternalList(approvedPatches); } /** *

* A list of explicitly approved patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

*

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

* * @param approvedPatches * A list of explicitly approved patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withApprovedPatches(String... approvedPatches) { if (this.approvedPatches == null) { setApprovedPatches(new com.amazonaws.internal.SdkInternalList(approvedPatches.length)); } for (String ele : approvedPatches) { this.approvedPatches.add(ele); } return this; } /** *

* A list of explicitly approved patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @param approvedPatches * A list of explicitly approved patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withApprovedPatches(java.util.Collection approvedPatches) { setApprovedPatches(approvedPatches); return this; } /** *

* Defines the compliance level for approved patches. When an approved patch is reported as missing, this value * describes the severity of the compliance violation. *

* * @param approvedPatchesComplianceLevel * Defines the compliance level for approved patches. When an approved patch is reported as missing, this * value describes the severity of the compliance violation. * @see PatchComplianceLevel */ public void setApprovedPatchesComplianceLevel(String approvedPatchesComplianceLevel) { this.approvedPatchesComplianceLevel = approvedPatchesComplianceLevel; } /** *

* Defines the compliance level for approved patches. When an approved patch is reported as missing, this value * describes the severity of the compliance violation. *

* * @return Defines the compliance level for approved patches. When an approved patch is reported as missing, this * value describes the severity of the compliance violation. * @see PatchComplianceLevel */ public String getApprovedPatchesComplianceLevel() { return this.approvedPatchesComplianceLevel; } /** *

* Defines the compliance level for approved patches. When an approved patch is reported as missing, this value * describes the severity of the compliance violation. *

* * @param approvedPatchesComplianceLevel * Defines the compliance level for approved patches. When an approved patch is reported as missing, this * value describes the severity of the compliance violation. * @return Returns a reference to this object so that method calls can be chained together. * @see PatchComplianceLevel */ public BaselineOverride withApprovedPatchesComplianceLevel(String approvedPatchesComplianceLevel) { setApprovedPatchesComplianceLevel(approvedPatchesComplianceLevel); return this; } /** *

* Defines the compliance level for approved patches. When an approved patch is reported as missing, this value * describes the severity of the compliance violation. *

* * @param approvedPatchesComplianceLevel * Defines the compliance level for approved patches. When an approved patch is reported as missing, this * value describes the severity of the compliance violation. * @return Returns a reference to this object so that method calls can be chained together. * @see PatchComplianceLevel */ public BaselineOverride withApprovedPatchesComplianceLevel(PatchComplianceLevel approvedPatchesComplianceLevel) { this.approvedPatchesComplianceLevel = approvedPatchesComplianceLevel.toString(); return this; } /** *

* A list of explicitly rejected patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @return A list of explicitly rejected patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. */ public java.util.List getRejectedPatches() { if (rejectedPatches == null) { rejectedPatches = new com.amazonaws.internal.SdkInternalList(); } return rejectedPatches; } /** *

* A list of explicitly rejected patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @param rejectedPatches * A list of explicitly rejected patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. */ public void setRejectedPatches(java.util.Collection rejectedPatches) { if (rejectedPatches == null) { this.rejectedPatches = null; return; } this.rejectedPatches = new com.amazonaws.internal.SdkInternalList(rejectedPatches); } /** *

* A list of explicitly rejected patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

*

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

* * @param rejectedPatches * A list of explicitly rejected patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withRejectedPatches(String... rejectedPatches) { if (this.rejectedPatches == null) { setRejectedPatches(new com.amazonaws.internal.SdkInternalList(rejectedPatches.length)); } for (String ele : rejectedPatches) { this.rejectedPatches.add(ele); } return this; } /** *

* A list of explicitly rejected patches for the baseline. *

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services Systems * Manager User Guide. *

* * @param rejectedPatches * A list of explicitly rejected patches for the baseline.

*

* For information about accepted formats for lists of approved patches and rejected patches, see About package name formats for approved and rejected patch lists in the Amazon Web Services * Systems Manager User Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withRejectedPatches(java.util.Collection rejectedPatches) { setRejectedPatches(rejectedPatches); return this; } /** *

* The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can * be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it * as a dependency. *

* * @param rejectedPatchesAction * The action for Patch Manager to take on patches included in the RejectedPackages list. A * patch can be allowed only if it is a dependency of another package, or blocked entirely along with * packages that include it as a dependency. * @see PatchAction */ public void setRejectedPatchesAction(String rejectedPatchesAction) { this.rejectedPatchesAction = rejectedPatchesAction; } /** *

* The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can * be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it * as a dependency. *

* * @return The action for Patch Manager to take on patches included in the RejectedPackages list. A * patch can be allowed only if it is a dependency of another package, or blocked entirely along with * packages that include it as a dependency. * @see PatchAction */ public String getRejectedPatchesAction() { return this.rejectedPatchesAction; } /** *

* The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can * be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it * as a dependency. *

* * @param rejectedPatchesAction * The action for Patch Manager to take on patches included in the RejectedPackages list. A * patch can be allowed only if it is a dependency of another package, or blocked entirely along with * packages that include it as a dependency. * @return Returns a reference to this object so that method calls can be chained together. * @see PatchAction */ public BaselineOverride withRejectedPatchesAction(String rejectedPatchesAction) { setRejectedPatchesAction(rejectedPatchesAction); return this; } /** *

* The action for Patch Manager to take on patches included in the RejectedPackages list. A patch can * be allowed only if it is a dependency of another package, or blocked entirely along with packages that include it * as a dependency. *

* * @param rejectedPatchesAction * The action for Patch Manager to take on patches included in the RejectedPackages list. A * patch can be allowed only if it is a dependency of another package, or blocked entirely along with * packages that include it as a dependency. * @return Returns a reference to this object so that method calls can be chained together. * @see PatchAction */ public BaselineOverride withRejectedPatchesAction(PatchAction rejectedPatchesAction) { this.rejectedPatchesAction = rejectedPatchesAction.toString(); return this; } /** *

* Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. *

* * @param approvedPatchesEnableNonSecurity * Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. */ public void setApprovedPatchesEnableNonSecurity(Boolean approvedPatchesEnableNonSecurity) { this.approvedPatchesEnableNonSecurity = approvedPatchesEnableNonSecurity; } /** *

* Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. *

* * @return Indicates whether the list of approved patches includes non-security updates that should be applied to * the managed nodes. The default value is false. Applies to Linux managed nodes only. */ public Boolean getApprovedPatchesEnableNonSecurity() { return this.approvedPatchesEnableNonSecurity; } /** *

* Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. *

* * @param approvedPatchesEnableNonSecurity * Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withApprovedPatchesEnableNonSecurity(Boolean approvedPatchesEnableNonSecurity) { setApprovedPatchesEnableNonSecurity(approvedPatchesEnableNonSecurity); return this; } /** *

* Indicates whether the list of approved patches includes non-security updates that should be applied to the * managed nodes. The default value is false. Applies to Linux managed nodes only. *

* * @return Indicates whether the list of approved patches includes non-security updates that should be applied to * the managed nodes. The default value is false. Applies to Linux managed nodes only. */ public Boolean isApprovedPatchesEnableNonSecurity() { return this.approvedPatchesEnableNonSecurity; } /** *

* Information about the patches to use to update the managed nodes, including target operating systems and source * repositories. Applies to Linux managed nodes only. *

* * @return Information about the patches to use to update the managed nodes, including target operating systems and * source repositories. Applies to Linux managed nodes only. */ public java.util.List getSources() { if (sources == null) { sources = new com.amazonaws.internal.SdkInternalList(); } return sources; } /** *

* Information about the patches to use to update the managed nodes, including target operating systems and source * repositories. Applies to Linux managed nodes only. *

* * @param sources * Information about the patches to use to update the managed nodes, including target operating systems and * source repositories. Applies to Linux managed nodes only. */ public void setSources(java.util.Collection sources) { if (sources == null) { this.sources = null; return; } this.sources = new com.amazonaws.internal.SdkInternalList(sources); } /** *

* Information about the patches to use to update the managed nodes, including target operating systems and source * repositories. Applies to Linux managed nodes only. *

*

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

* * @param sources * Information about the patches to use to update the managed nodes, including target operating systems and * source repositories. Applies to Linux managed nodes only. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withSources(PatchSource... sources) { if (this.sources == null) { setSources(new com.amazonaws.internal.SdkInternalList(sources.length)); } for (PatchSource ele : sources) { this.sources.add(ele); } return this; } /** *

* Information about the patches to use to update the managed nodes, including target operating systems and source * repositories. Applies to Linux managed nodes only. *

* * @param sources * Information about the patches to use to update the managed nodes, including target operating systems and * source repositories. Applies to Linux managed nodes only. * @return Returns a reference to this object so that method calls can be chained together. */ public BaselineOverride withSources(java.util.Collection sources) { setSources(sources); 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 (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getGlobalFilters() != null) sb.append("GlobalFilters: ").append(getGlobalFilters()).append(","); if (getApprovalRules() != null) sb.append("ApprovalRules: ").append(getApprovalRules()).append(","); if (getApprovedPatches() != null) sb.append("ApprovedPatches: ").append(getApprovedPatches()).append(","); if (getApprovedPatchesComplianceLevel() != null) sb.append("ApprovedPatchesComplianceLevel: ").append(getApprovedPatchesComplianceLevel()).append(","); if (getRejectedPatches() != null) sb.append("RejectedPatches: ").append(getRejectedPatches()).append(","); if (getRejectedPatchesAction() != null) sb.append("RejectedPatchesAction: ").append(getRejectedPatchesAction()).append(","); if (getApprovedPatchesEnableNonSecurity() != null) sb.append("ApprovedPatchesEnableNonSecurity: ").append(getApprovedPatchesEnableNonSecurity()).append(","); if (getSources() != null) sb.append("Sources: ").append(getSources()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof BaselineOverride == false) return false; BaselineOverride other = (BaselineOverride) obj; if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null) return false; if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false) return false; if (other.getGlobalFilters() == null ^ this.getGlobalFilters() == null) return false; if (other.getGlobalFilters() != null && other.getGlobalFilters().equals(this.getGlobalFilters()) == false) return false; if (other.getApprovalRules() == null ^ this.getApprovalRules() == null) return false; if (other.getApprovalRules() != null && other.getApprovalRules().equals(this.getApprovalRules()) == false) return false; if (other.getApprovedPatches() == null ^ this.getApprovedPatches() == null) return false; if (other.getApprovedPatches() != null && other.getApprovedPatches().equals(this.getApprovedPatches()) == false) return false; if (other.getApprovedPatchesComplianceLevel() == null ^ this.getApprovedPatchesComplianceLevel() == null) return false; if (other.getApprovedPatchesComplianceLevel() != null && other.getApprovedPatchesComplianceLevel().equals(this.getApprovedPatchesComplianceLevel()) == false) return false; if (other.getRejectedPatches() == null ^ this.getRejectedPatches() == null) return false; if (other.getRejectedPatches() != null && other.getRejectedPatches().equals(this.getRejectedPatches()) == false) return false; if (other.getRejectedPatchesAction() == null ^ this.getRejectedPatchesAction() == null) return false; if (other.getRejectedPatchesAction() != null && other.getRejectedPatchesAction().equals(this.getRejectedPatchesAction()) == false) return false; if (other.getApprovedPatchesEnableNonSecurity() == null ^ this.getApprovedPatchesEnableNonSecurity() == null) return false; if (other.getApprovedPatchesEnableNonSecurity() != null && other.getApprovedPatchesEnableNonSecurity().equals(this.getApprovedPatchesEnableNonSecurity()) == false) return false; if (other.getSources() == null ^ this.getSources() == null) return false; if (other.getSources() != null && other.getSources().equals(this.getSources()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getGlobalFilters() == null) ? 0 : getGlobalFilters().hashCode()); hashCode = prime * hashCode + ((getApprovalRules() == null) ? 0 : getApprovalRules().hashCode()); hashCode = prime * hashCode + ((getApprovedPatches() == null) ? 0 : getApprovedPatches().hashCode()); hashCode = prime * hashCode + ((getApprovedPatchesComplianceLevel() == null) ? 0 : getApprovedPatchesComplianceLevel().hashCode()); hashCode = prime * hashCode + ((getRejectedPatches() == null) ? 0 : getRejectedPatches().hashCode()); hashCode = prime * hashCode + ((getRejectedPatchesAction() == null) ? 0 : getRejectedPatchesAction().hashCode()); hashCode = prime * hashCode + ((getApprovedPatchesEnableNonSecurity() == null) ? 0 : getApprovedPatchesEnableNonSecurity().hashCode()); hashCode = prime * hashCode + ((getSources() == null) ? 0 : getSources().hashCode()); return hashCode; } @Override public BaselineOverride clone() { try { return (BaselineOverride) 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.simplesystemsmanagement.model.transform.BaselineOverrideMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy