// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.analytics.purview.sharing.models;

import java.time.OffsetDateTime;
import java.util.UUID;

import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * An service invitation kind.
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "invitationKind")
@JsonTypeName("Service")
@JsonFlatten
@Fluent
public class ServiceInvitation extends SentShareInvitation {
    /*
     * The time at which the invitation will expire. Represented in the standard date-time format as defined by [RFC
     * 3339](https://www.rfc-editor.org/rfc/rfc3339)
     */
    @JsonProperty(value = "properties.expirationDate")
    private OffsetDateTime expirationDate;

    /*
     * Email address of the sender.
     */
    @JsonProperty(value = "properties.senderEmail", access = JsonProperty.Access.WRITE_ONLY)
    private String senderEmail;

    /*
     * Name of the sender
     */
    @JsonProperty(value = "properties.senderName", access = JsonProperty.Access.WRITE_ONLY)
    private String senderName;

    /*
     * Tenant name of the sender
     */
    @JsonProperty(value = "properties.senderTenantName", access = JsonProperty.Access.WRITE_ONLY)
    private String senderTenantName;

    /*
     * Gets the time at which the invitation was sent. Represented in the standard date-time format as defined by [RFC
     * 3339](https://www.rfc-editor.org/rfc/rfc3339)
     */
    @JsonProperty(value = "properties.sentAt", access = JsonProperty.Access.WRITE_ONLY)
    private OffsetDateTime sentAt;

    /*
     * Share status.
     */
    @JsonProperty(value = "properties.shareStatus")
    private ShareStatus shareStatus;

    /*
     * State of the resource
     */
    @JsonProperty(value = "properties.state", access = JsonProperty.Access.WRITE_ONLY)
    private State state;

    /*
     * The target azure active directory id the invitation is sent to.
     */
    @JsonProperty(value = "properties.targetActiveDirectoryId", required = true)
    private UUID targetActiveDirectoryId;

    /*
     * The target object id in the azure active directory the invitation is sent to.
     */
    @JsonProperty(value = "properties.targetObjectId", required = true)
    private UUID targetObjectId;

    /**
     * Creates an instance of ServiceInvitation class.
     */
    public ServiceInvitation() {
    }

    /**
     * Get the expirationDate property: The time at which the invitation will expire. Represented in the standard
     * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).
     * 
     * @return the expirationDate value.
     */
    public OffsetDateTime getExpirationDate() {
        return this.expirationDate;
    }

    /**
     * Set the expirationDate property: The time at which the invitation will expire. Represented in the standard
     * date-time format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).
     * 
     * @param expirationDate the expirationDate value to set.
     * @return the ServiceInvitation object itself.
     */
    public ServiceInvitation setExpirationDate(OffsetDateTime expirationDate) {
        this.expirationDate = expirationDate;
        return this;
    }

    /**
     * Get the senderEmail property: Email address of the sender.
     * 
     * @return the senderEmail value.
     */
    public String getSenderEmail() {
        return this.senderEmail;
    }

    /**
     * Get the senderName property: Name of the sender.
     * 
     * @return the senderName value.
     */
    public String getSenderName() {
        return this.senderName;
    }

    /**
     * Get the senderTenantName property: Tenant name of the sender.
     * 
     * @return the senderTenantName value.
     */
    public String getSenderTenantName() {
        return this.senderTenantName;
    }

    /**
     * Get the sentAt property: Gets the time at which the invitation was sent. Represented in the standard date-time
     * format as defined by [RFC 3339](https://www.rfc-editor.org/rfc/rfc3339).
     * 
     * @return the sentAt value.
     */
    public OffsetDateTime getSentAt() {
        return this.sentAt;
    }

    /**
     * Get the shareStatus property: Share status.
     * 
     * @return the shareStatus value.
     */
    public ShareStatus getShareStatus() {
        return this.shareStatus;
    }

    /**
     * Set the shareStatus property: Share status.
     * 
     * @param shareStatus the shareStatus value to set.
     * @return the ServiceInvitation object itself.
     */
    public ServiceInvitation setShareStatus(ShareStatus shareStatus) {
        this.shareStatus = shareStatus;
        return this;
    }

    /**
     * Get the state property: State of the resource.
     * 
     * @return the state value.
     */
    public State getState() {
        return this.state;
    }

    /**
     * Get the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to.
     * 
     * @return the targetActiveDirectoryId value.
     */
    public UUID getTargetActiveDirectoryId() {
        return this.targetActiveDirectoryId;
    }

    /**
     * Set the targetActiveDirectoryId property: The target azure active directory id the invitation is sent to.
     * 
     * @param targetActiveDirectoryId the targetActiveDirectoryId value to set.
     * @return the ServiceInvitation object itself.
     */
    public ServiceInvitation setTargetActiveDirectoryId(UUID targetActiveDirectoryId) {
        this.targetActiveDirectoryId = targetActiveDirectoryId;
        return this;
    }

    /**
     * Get the targetObjectId property: The target object id in the azure active directory the invitation is sent to.
     * 
     * @return the targetObjectId value.
     */
    public UUID getTargetObjectId() {
        return this.targetObjectId;
    }

    /**
     * Set the targetObjectId property: The target object id in the azure active directory the invitation is sent to.
     * 
     * @param targetObjectId the targetObjectId value to set.
     * @return the ServiceInvitation object itself.
     */
    public ServiceInvitation setTargetObjectId(UUID targetObjectId) {
        this.targetObjectId = targetObjectId;
        return this;
    }
}
