models.ServiceAccountData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of service-accounts-sdk Show documentation
Show all versions of service-accounts-sdk Show documentation
Service Accounts SDK for RHOAS API supports interaction with Service Accounts
The newest version!
package com.openshift.cloud.api.serviceaccounts.models;
import com.microsoft.kiota.serialization.AdditionalDataHolder;
import com.microsoft.kiota.serialization.Parsable;
import com.microsoft.kiota.serialization.ParseNode;
import com.microsoft.kiota.serialization.SerializationWriter;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
public class ServiceAccountData implements AdditionalDataHolder, Parsable {
/** Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. */
private Map additionalData;
/** The clientId property */
private String clientId;
/** The createdAt property */
private Long createdAt;
/** The createdBy property */
private String createdBy;
/** The description property */
private String description;
/** The id property */
private String id;
/** The name property */
private String name;
/** Provided during creation and resetting of service account credentials. */
private String secret;
/**
* Instantiates a new ServiceAccountData and sets the default values.
* @return a void
*/
@javax.annotation.Nullable
public ServiceAccountData() {
this.setAdditionalData(new HashMap<>());
}
/**
* 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 ServiceAccountData
*/
@javax.annotation.Nonnull
public static ServiceAccountData createFromDiscriminatorValue(@javax.annotation.Nonnull final ParseNode parseNode) {
Objects.requireNonNull(parseNode);
return new ServiceAccountData();
}
/**
* Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @return a Map
*/
@javax.annotation.Nonnull
public Map getAdditionalData() {
return this.additionalData;
}
/**
* Gets the clientId property value. The clientId property
* @return a string
*/
@javax.annotation.Nullable
public String getClientId() {
return this.clientId;
}
/**
* Gets the createdAt property value. The createdAt property
* @return a int64
*/
@javax.annotation.Nullable
public Long getCreatedAt() {
return this.createdAt;
}
/**
* Gets the createdBy property value. The createdBy property
* @return a string
*/
@javax.annotation.Nullable
public String getCreatedBy() {
return this.createdBy;
}
/**
* Gets the description property value. The description property
* @return a string
*/
@javax.annotation.Nullable
public String getDescription() {
return this.description;
}
/**
* The deserialization information for the current model
* @return a Map>
*/
@javax.annotation.Nonnull
public Map> getFieldDeserializers() {
final HashMap> deserializerMap = new HashMap>(7);
deserializerMap.put("clientId", (n) -> { this.setClientId(n.getStringValue()); });
deserializerMap.put("createdAt", (n) -> { this.setCreatedAt(n.getLongValue()); });
deserializerMap.put("createdBy", (n) -> { this.setCreatedBy(n.getStringValue()); });
deserializerMap.put("description", (n) -> { this.setDescription(n.getStringValue()); });
deserializerMap.put("id", (n) -> { this.setId(n.getStringValue()); });
deserializerMap.put("name", (n) -> { this.setName(n.getStringValue()); });
deserializerMap.put("secret", (n) -> { this.setSecret(n.getStringValue()); });
return deserializerMap;
}
/**
* Gets the id property value. The id property
* @return a string
*/
@javax.annotation.Nullable
public String getId() {
return this.id;
}
/**
* Gets the name property value. The name property
* @return a string
*/
@javax.annotation.Nullable
public String getName() {
return this.name;
}
/**
* Gets the secret property value. Provided during creation and resetting of service account credentials.
* @return a string
*/
@javax.annotation.Nullable
public String getSecret() {
return this.secret;
}
/**
* Serializes information the current object
* @param writer Serialization writer to use to serialize this model
* @return a void
*/
@javax.annotation.Nonnull
public void serialize(@javax.annotation.Nonnull final SerializationWriter writer) {
Objects.requireNonNull(writer);
writer.writeStringValue("clientId", this.getClientId());
writer.writeLongValue("createdAt", this.getCreatedAt());
writer.writeStringValue("createdBy", this.getCreatedBy());
writer.writeStringValue("description", this.getDescription());
writer.writeStringValue("id", this.getId());
writer.writeStringValue("name", this.getName());
writer.writeStringValue("secret", this.getSecret());
writer.writeAdditionalData(this.getAdditionalData());
}
/**
* Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
* @param value Value to set for the AdditionalData property.
* @return a void
*/
@javax.annotation.Nonnull
public void setAdditionalData(@javax.annotation.Nullable final Map value) {
this.additionalData = value;
}
/**
* Sets the clientId property value. The clientId property
* @param value Value to set for the clientId property.
* @return a void
*/
@javax.annotation.Nonnull
public void setClientId(@javax.annotation.Nullable final String value) {
this.clientId = value;
}
/**
* Sets the createdAt property value. The createdAt property
* @param value Value to set for the createdAt property.
* @return a void
*/
@javax.annotation.Nonnull
public void setCreatedAt(@javax.annotation.Nullable final Long value) {
this.createdAt = value;
}
/**
* Sets the createdBy property value. The createdBy property
* @param value Value to set for the createdBy property.
* @return a void
*/
@javax.annotation.Nonnull
public void setCreatedBy(@javax.annotation.Nullable final String value) {
this.createdBy = value;
}
/**
* Sets the description property value. The description property
* @param value Value to set for the description property.
* @return a void
*/
@javax.annotation.Nonnull
public void setDescription(@javax.annotation.Nullable final String value) {
this.description = value;
}
/**
* Sets the id property value. The id property
* @param value Value to set for the id property.
* @return a void
*/
@javax.annotation.Nonnull
public void setId(@javax.annotation.Nullable final String value) {
this.id = value;
}
/**
* Sets the name property value. The name property
* @param value Value to set for the name property.
* @return a void
*/
@javax.annotation.Nonnull
public void setName(@javax.annotation.Nullable final String value) {
this.name = value;
}
/**
* Sets the secret property value. Provided during creation and resetting of service account credentials.
* @param value Value to set for the secret property.
* @return a void
*/
@javax.annotation.Nonnull
public void setSecret(@javax.annotation.Nullable final String value) {
this.secret = value;
}
}