// Code generated by azure-service-operator-codegen. DO NOT EDIT.
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
package arm

import "github.com/Azure/azure-service-operator/v2/pkg/genruntime"

type NamespacesTopicsSubscription_Spec struct {
	Name string `json:"name,omitempty"`

	// Properties: Properties of subscriptions resource.
	Properties *SBSubscriptionProperties `json:"properties,omitempty"`
}

var _ genruntime.ARMResourceSpec = &NamespacesTopicsSubscription_Spec{}

// GetAPIVersion returns the ARM API version of the resource. This is always "2024-01-01"
func (subscription NamespacesTopicsSubscription_Spec) GetAPIVersion() string {
	return "2024-01-01"
}

// GetName returns the Name of the resource
func (subscription *NamespacesTopicsSubscription_Spec) GetName() string {
	return subscription.Name
}

// GetType returns the ARM Type of the resource. This is always "Microsoft.ServiceBus/namespaces/topics/subscriptions"
func (subscription *NamespacesTopicsSubscription_Spec) GetType() string {
	return "Microsoft.ServiceBus/namespaces/topics/subscriptions"
}

// Description of Subscription Resource.
type SBSubscriptionProperties struct {
	// AutoDeleteOnIdle: ISO 8061 timeSpan idle interval after which the topic is automatically deleted. The minimum duration
	// is 5 minutes.
	AutoDeleteOnIdle *string `json:"autoDeleteOnIdle,omitempty"`

	// ClientAffineProperties: Properties specific to client affine subscriptions.
	ClientAffineProperties *SBClientAffineProperties `json:"clientAffineProperties,omitempty"`

	// DeadLetteringOnFilterEvaluationExceptions: Value that indicates whether a subscription has dead letter support on filter
	// evaluation exceptions.
	DeadLetteringOnFilterEvaluationExceptions *bool `json:"deadLetteringOnFilterEvaluationExceptions,omitempty"`

	// DeadLetteringOnMessageExpiration: Value that indicates whether a subscription has dead letter support when a message
	// expires.
	DeadLetteringOnMessageExpiration *bool `json:"deadLetteringOnMessageExpiration,omitempty"`

	// DefaultMessageTimeToLive: ISO 8061 Default message timespan to live value. This is the duration after which the message
	// expires, starting from when the message is sent to Service Bus. This is the default value used when TimeToLive is not
	// set on a message itself.
	DefaultMessageTimeToLive *string `json:"defaultMessageTimeToLive,omitempty"`

	// DuplicateDetectionHistoryTimeWindow: ISO 8601 timeSpan structure that defines the duration of the duplicate detection
	// history. The default value is 10 minutes.
	DuplicateDetectionHistoryTimeWindow *string `json:"duplicateDetectionHistoryTimeWindow,omitempty"`

	// EnableBatchedOperations: Value that indicates whether server-side batched operations are enabled.
	EnableBatchedOperations *bool `json:"enableBatchedOperations,omitempty"`

	// ForwardDeadLetteredMessagesTo: Queue/Topic name to forward the Dead Letter message
	ForwardDeadLetteredMessagesTo *string `json:"forwardDeadLetteredMessagesTo,omitempty"`

	// ForwardTo: Queue/Topic name to forward the messages
	ForwardTo *string `json:"forwardTo,omitempty"`

	// IsClientAffine: Value that indicates whether the subscription has an affinity to the client id.
	IsClientAffine *bool `json:"isClientAffine,omitempty"`

	// LockDuration: ISO 8061 lock duration timespan for the subscription. The default value is 1 minute.
	LockDuration *string `json:"lockDuration,omitempty"`

	// MaxDeliveryCount: Number of maximum deliveries.
	MaxDeliveryCount *int `json:"maxDeliveryCount,omitempty"`

	// RequiresSession: Value indicating if a subscription supports the concept of sessions.
	RequiresSession *bool `json:"requiresSession,omitempty"`
}

// Properties specific to client affine subscriptions.
type SBClientAffineProperties struct {
	// ClientId: Indicates the Client ID of the application that created the client-affine subscription.
	ClientId *string `json:"clientId,omitempty"`

	// IsDurable: For client-affine subscriptions, this value indicates whether the subscription is durable or not.
	IsDurable *bool `json:"isDurable,omitempty"`

	// IsShared: For client-affine subscriptions, this value indicates whether the subscription is shared or not.
	IsShared *bool `json:"isShared,omitempty"`
}
