com.microsoft.graph.beta.generated.models.IosCertificateProfileBase Maven / Gradle / Ivy
package com.microsoft.graph.beta.models;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.EnumSet;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* iOS certificate profile base.
*/
@jakarta.annotation.Generated("com.microsoft.kiota")
public class IosCertificateProfileBase extends IosCertificateProfile implements Parsable {
/**
* Instantiates a new {@link IosCertificateProfileBase} and sets the default values.
*/
public IosCertificateProfileBase() {
super();
this.setOdataType("#microsoft.graph.iosCertificateProfileBase");
}
/**
* Creates a new instance of the appropriate class based on discriminator value
* @param parseNode The parse node to use to read the discriminator value and create the object
* @return a {@link IosCertificateProfileBase}
*/
@jakarta.annotation.Nonnull
public static IosCertificateProfileBase createFromDiscriminatorValue(@jakarta.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
final ParseNode mappingValueNode = parseNode.getChildNode("@odata.type");
if (mappingValueNode != null) {
final String mappingValue = mappingValueNode.getStringValue();
switch (mappingValue) {
case "#microsoft.graph.iosPkcsCertificateProfile": return new IosPkcsCertificateProfile();
case "#microsoft.graph.iosScepCertificateProfile": return new IosScepCertificateProfile();
}
}
return new IosCertificateProfileBase();
}
/**
* Gets the certificateValidityPeriodScale property value. Certificate Validity Period Options.
* @return a {@link CertificateValidityPeriodScale}
*/
@jakarta.annotation.Nullable
public CertificateValidityPeriodScale getCertificateValidityPeriodScale() {
return this.backingStore.get("certificateValidityPeriodScale");
}
/**
* Gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period.
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getCertificateValidityPeriodValue() {
return this.backingStore.get("certificateValidityPeriodValue");
}
/**
* The deserialization information for the current model
* @return a {@link Map>}
*/
@jakarta.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(super.getFieldDeserializers());
deserializerMap.put("certificateValidityPeriodScale", (n) -> { this.setCertificateValidityPeriodScale(n.getEnumValue(CertificateValidityPeriodScale::forValue)); });
deserializerMap.put("certificateValidityPeriodValue", (n) -> { this.setCertificateValidityPeriodValue(n.getIntegerValue()); });
deserializerMap.put("renewalThresholdPercentage", (n) -> { this.setRenewalThresholdPercentage(n.getIntegerValue()); });
deserializerMap.put("subjectAlternativeNameType", (n) -> { this.setSubjectAlternativeNameType(n.getEnumSetValue(SubjectAlternativeNameType::forValue)); });
deserializerMap.put("subjectNameFormat", (n) -> { this.setSubjectNameFormat(n.getEnumValue(AppleSubjectNameFormat::forValue)); });
return deserializerMap;
}
/**
* Gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99
* @return a {@link Integer}
*/
@jakarta.annotation.Nullable
public Integer getRenewalThresholdPercentage() {
return this.backingStore.get("renewalThresholdPercentage");
}
/**
* Gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier.
* @return a {@link EnumSet}
*/
@jakarta.annotation.Nullable
public EnumSet getSubjectAlternativeNameType() {
return this.backingStore.get("subjectAlternativeNameType");
}
/**
* Gets the subjectNameFormat property value. Subject Name Format Options for Apple devices.
* @return a {@link AppleSubjectNameFormat}
*/
@jakarta.annotation.Nullable
public AppleSubjectNameFormat getSubjectNameFormat() {
return this.backingStore.get("subjectNameFormat");
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
*/
public void serialize(@jakarta.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
super.serialize(writer);
writer.writeEnumValue("certificateValidityPeriodScale", this.getCertificateValidityPeriodScale());
writer.writeIntegerValue("certificateValidityPeriodValue", this.getCertificateValidityPeriodValue());
writer.writeIntegerValue("renewalThresholdPercentage", this.getRenewalThresholdPercentage());
writer.writeEnumSetValue("subjectAlternativeNameType", this.getSubjectAlternativeNameType());
writer.writeEnumValue("subjectNameFormat", this.getSubjectNameFormat());
}
/**
* Sets the certificateValidityPeriodScale property value. Certificate Validity Period Options.
* @param value Value to set for the certificateValidityPeriodScale property.
*/
public void setCertificateValidityPeriodScale(@jakarta.annotation.Nullable final CertificateValidityPeriodScale value) {
this.backingStore.set("certificateValidityPeriodScale", value);
}
/**
* Sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period.
* @param value Value to set for the certificateValidityPeriodValue property.
*/
public void setCertificateValidityPeriodValue(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("certificateValidityPeriodValue", value);
}
/**
* Sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99
* @param value Value to set for the renewalThresholdPercentage property.
*/
public void setRenewalThresholdPercentage(@jakarta.annotation.Nullable final Integer value) {
this.backingStore.set("renewalThresholdPercentage", value);
}
/**
* Sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier.
* @param value Value to set for the subjectAlternativeNameType property.
*/
public void setSubjectAlternativeNameType(@jakarta.annotation.Nullable final EnumSet value) {
this.backingStore.set("subjectAlternativeNameType", value);
}
/**
* Sets the subjectNameFormat property value. Subject Name Format Options for Apple devices.
* @param value Value to set for the subjectNameFormat property.
*/
public void setSubjectNameFormat(@jakarta.annotation.Nullable final AppleSubjectNameFormat value) {
this.backingStore.set("subjectNameFormat", value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy