// Package service provides primitives to interact the openapi HTTP API.
//
// Code generated by go-sdk-codegen DO NOT EDIT.
package service

import (
	"time"
)

// AddAppointmentRequest defines model for AddAppointmentRequest.
type AddAppointmentRequest struct {

	// The input appointment time details.
	AppointmentTime AppointmentTimeInput `json:"appointmentTime"`
}

// Address defines model for Address.
type Address struct {

	// The first line of the address.
	AddressLine1 string `json:"addressLine1"`

	// Additional address information, if required.
	AddressLine2 *string `json:"addressLine2,omitempty"`

	// Additional address information, if required.
	AddressLine3 *string `json:"addressLine3,omitempty"`

	// The city.
	City *string `json:"city,omitempty"`

	// The two digit country code, in ISO 3166-1 alpha-2 format.
	CountryCode *string `json:"countryCode,omitempty"`

	// The county.
	County *string `json:"county,omitempty"`

	// The district.
	District *string `json:"district,omitempty"`

	// The name of the person, business, or institution.
	Name string `json:"name"`

	// The phone number.
	Phone *string `json:"phone,omitempty"`

	// The postal code. This can contain letters, digits, spaces, and/or punctuation.
	PostalCode *string `json:"postalCode,omitempty"`

	// The state or region.
	StateOrRegion *string `json:"stateOrRegion,omitempty"`
}

// Appointment defines model for Appointment.
type Appointment struct {

	// The appointment identifier.
	AppointmentId *AppointmentId `json:"appointmentId,omitempty"`

	// The status of the appointment.
	AppointmentStatus *string `json:"appointmentStatus,omitempty"`

	// The time of the appointment window.
	AppointmentTime *AppointmentTime `json:"appointmentTime,omitempty"`

	// A list of technicians assigned to the service job.
	AssignedTechnicians *[]Technician `json:"assignedTechnicians,omitempty"`

	// Proof of Appointment (POA) details.
	Poa *Poa `json:"poa,omitempty"`

	// The appointment identifier.
	RescheduledAppointmentId *AppointmentId `json:"rescheduledAppointmentId,omitempty"`
}

// AppointmentId defines model for AppointmentId.
type AppointmentId string

// AppointmentTime defines model for AppointmentTime.
type AppointmentTime struct {

	// The duration of the appointment window, in minutes.
	DurationInMinutes int `json:"durationInMinutes"`

	// The date and time of the start of the appointment window, in ISO 8601 format.
	StartTime time.Time `json:"startTime"`
}

// AppointmentTimeInput defines model for AppointmentTimeInput.
type AppointmentTimeInput struct {

	// The duration of an appointment in minutes.
	DurationInMinutes *int `json:"durationInMinutes,omitempty"`

	// The date, time in UTC for the start time of an appointment in ISO 8601 format.
	StartTime time.Time `json:"startTime"`
}

// AssociatedItem defines model for AssociatedItem.
type AssociatedItem struct {

	// The Amazon Standard Identification Number (ASIN) of the item.
	Asin *string `json:"asin,omitempty"`

	// The brand name of the item.
	BrandName *string `json:"brandName,omitempty"`

	// Delivery information for the item.
	ItemDelivery *ItemDelivery `json:"itemDelivery,omitempty"`

	// The status of the item.
	ItemStatus *string `json:"itemStatus,omitempty"`

	// The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format.
	OrderId *OrderId `json:"orderId,omitempty"`

	// The total number of items included in the order.
	Quantity *int `json:"quantity,omitempty"`

	// The title of the item.
	Title *string `json:"title,omitempty"`
}

// Buyer defines model for Buyer.
type Buyer struct {

	// The identifier of the buyer.
	BuyerId *string `json:"buyerId,omitempty"`

	// When true, the service is for an Amazon Prime buyer.
	IsPrimeMember *bool `json:"isPrimeMember,omitempty"`

	// The name of the buyer.
	Name *string `json:"name,omitempty"`

	// The phone number of the buyer.
	Phone *string `json:"phone,omitempty"`
}

// CancelServiceJobByServiceJobIdResponse defines model for CancelServiceJobByServiceJobIdResponse.
type CancelServiceJobByServiceJobIdResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

// CompleteServiceJobByServiceJobIdResponse defines model for CompleteServiceJobByServiceJobIdResponse.
type CompleteServiceJobByServiceJobIdResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`
}

// Error defines model for Error.
type Error struct {

	// An error code that identifies the type of error that occurred.
	Code string `json:"code"`

	// Additional details that can help the caller understand or fix the issue.
	Details *string `json:"details,omitempty"`

	// The type of error.
	ErrorLevel *string `json:"errorLevel,omitempty"`

	// A message that describes the error condition in a human-readable form.
	Message string `json:"message"`
}

// ErrorList defines model for ErrorList.
type ErrorList []Error

// GetServiceJobByServiceJobIdResponse defines model for GetServiceJobByServiceJobIdResponse.
type GetServiceJobByServiceJobIdResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// The job details of a service.
	Payload *ServiceJob `json:"payload,omitempty"`
}

// GetServiceJobsResponse defines model for GetServiceJobsResponse.
type GetServiceJobsResponse struct {

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// The payload for the GetJobs operation.
	Payload *JobListing `json:"payload,omitempty"`
}

// ItemDelivery defines model for ItemDelivery.
type ItemDelivery struct {

	// The date and time of the latest Estimated Delivery Date (EDD) of all the items with an EDD. In ISO 8601 format.
	EstimatedDeliveryDate *time.Time `json:"estimatedDeliveryDate,omitempty"`

	// Promised delivery information for the item.
	ItemDeliveryPromise *ItemDeliveryPromise `json:"itemDeliveryPromise,omitempty"`
}

// ItemDeliveryPromise defines model for ItemDeliveryPromise.
type ItemDeliveryPromise struct {

	// The date and time of the end of the promised delivery window, in ISO 8601 format.
	EndTime *time.Time `json:"endTime,omitempty"`

	// The date and time of the start of the promised delivery window, in ISO 8601 format.
	StartTime *time.Time `json:"startTime,omitempty"`
}

// JobListing defines model for JobListing.
type JobListing struct {

	// List of job details for the given input.
	Jobs *[]ServiceJob `json:"jobs,omitempty"`

	// A generated string used to pass information to your next request.If nextPageToken is returned, pass the value of nextPageToken to the pageToken to get next results.
	NextPageToken *string `json:"nextPageToken,omitempty"`

	// A generated string used to pass information to your next request.If previousPageToken is returned, pass the value of previousPageToken to the pageToken to get previous page results.
	PreviousPageToken *string `json:"previousPageToken,omitempty"`

	// Total result size of the query result.
	TotalResultSize *int `json:"totalResultSize,omitempty"`
}

// OrderId defines model for OrderId.
type OrderId string

// Poa defines model for Poa.
type Poa struct {

	// The time of the appointment window.
	AppointmentTime *AppointmentTime `json:"appointmentTime,omitempty"`

	// The type of POA uploaded.
	PoaType *string `json:"poaType,omitempty"`

	// A list of technicians.
	Technicians *[]Technician `json:"technicians,omitempty"`

	// The date and time when the POA was uploaded, in ISO 8601 format.
	UploadTime *time.Time `json:"uploadTime,omitempty"`

	// The identifier of the technician who uploaded the POA.
	UploadingTechnician *string `json:"uploadingTechnician,omitempty"`
}

// RescheduleAppointmentRequest defines model for RescheduleAppointmentRequest.
type RescheduleAppointmentRequest struct {

	// The input appointment time details.
	AppointmentTime AppointmentTimeInput `json:"appointmentTime"`

	// Appointment reschedule reason code.
	RescheduleReasonCode RescheduleReasonCode `json:"rescheduleReasonCode"`
}

// RescheduleReasonCode defines model for RescheduleReasonCode.
type RescheduleReasonCode string

// ScopeOfWork defines model for ScopeOfWork.
type ScopeOfWork struct {

	// The Amazon Standard Identification Number (ASIN) of the service job.
	Asin *string `json:"asin,omitempty"`

	// The number of service jobs.
	Quantity *int `json:"quantity,omitempty"`

	// A list of skills required to perform the job.
	RequiredSkills *[]string `json:"requiredSkills,omitempty"`

	// The title of the service job.
	Title *string `json:"title,omitempty"`
}

// Seller defines model for Seller.
type Seller struct {

	// The identifier of the seller of the service job.
	SellerId *string `json:"sellerId,omitempty"`
}

// ServiceJob defines model for ServiceJob.
type ServiceJob struct {

	// A list of appointments.
	Appointments *[]Appointment `json:"appointments,omitempty"`

	// A list of items associated with the service job.
	AssociatedItems *[]AssociatedItem `json:"associatedItems,omitempty"`

	// Information about the buyer.
	Buyer *Buyer `json:"buyer,omitempty"`

	// The date and time of the creation of the job, in ISO 8601 format.
	CreateTime *time.Time `json:"createTime,omitempty"`

	// The marketplace identifier.
	MarketplaceId *string `json:"marketplaceId,omitempty"`

	// A list of appointment windows preferred by the buyer. Included only if the buyer selected appointment windows when creating the order.
	PreferredAppointmentTimes *[]AppointmentTime `json:"preferredAppointmentTimes,omitempty"`

	// The scope of work for the order.
	ScopeOfWork *ScopeOfWork `json:"scopeOfWork,omitempty"`

	// Information about the seller of the service job.
	Seller *Seller `json:"seller,omitempty"`

	// Amazon identifier for the service job.
	ServiceJobId *ServiceJobId `json:"serviceJobId,omitempty"`

	// Information about the service job provider.
	ServiceJobProvider *ServiceJobProvider `json:"serviceJobProvider,omitempty"`

	// The status of the service job.
	ServiceJobStatus *string `json:"serviceJobStatus,omitempty"`

	// Information about the location of the service job.
	ServiceLocation *ServiceLocation `json:"serviceLocation,omitempty"`

	// The Amazon-defined identifier for an order placed by the buyer, in 3-7-7 format.
	ServiceOrderId *OrderId `json:"serviceOrderId,omitempty"`
}

// ServiceJobId defines model for ServiceJobId.
type ServiceJobId string

// ServiceJobProvider defines model for ServiceJobProvider.
type ServiceJobProvider struct {

	// The identifier of the service job provider.
	ServiceJobProviderId *string `json:"serviceJobProviderId,omitempty"`
}

// ServiceLocation defines model for ServiceLocation.
type ServiceLocation struct {

	// The shipping address for the service job.
	Address *Address `json:"address,omitempty"`

	// The location of the service job.
	ServiceLocationType *string `json:"serviceLocationType,omitempty"`
}

// SetAppointmentResponse defines model for SetAppointmentResponse.
type SetAppointmentResponse struct {

	// The appointment identifier.
	AppointmentId *AppointmentId `json:"appointmentId,omitempty"`

	// A list of error responses returned when a request is unsuccessful.
	Errors *ErrorList `json:"errors,omitempty"`

	// A list of warnings returned in the sucessful execution response of an API request.
	Warnings *WarningList `json:"warnings,omitempty"`
}

// Technician defines model for Technician.
type Technician struct {

	// The name of the technician.
	Name *string `json:"name,omitempty"`

	// The technician identifier.
	TechnicianId *string `json:"technicianId,omitempty"`
}

// Warning defines model for Warning.
type Warning struct {

	// An warning code that identifies the type of warning that occurred.
	Code string `json:"code"`

	// Additional details that can help the caller understand or address the warning.
	Details *string `json:"details,omitempty"`

	// A message that describes the warning condition in a human-readable form.
	Message string `json:"message"`
}

// WarningList defines model for WarningList.
type WarningList []Warning

// GetServiceJobsParams defines parameters for GetServiceJobs.
type GetServiceJobsParams struct {

	// List of service order ids for the query you want to perform.Max values supported 20.
	ServiceOrderIds *[]string `json:"serviceOrderIds,omitempty"`

	// A list of one or more job status by which to filter the list of jobs.
	ServiceJobStatus *[]string `json:"serviceJobStatus,omitempty"`

	// String returned in the response of your previous request.
	PageToken *string `json:"pageToken,omitempty"`

	// A non-negative integer that indicates the maximum number of jobs to return in the list, Value must be 1 - 20. Default 20.
	PageSize *int `json:"pageSize,omitempty"`

	// Sort fields on which you want to sort the output.
	SortField *string `json:"sortField,omitempty"`

	// Sort order for the query you want to perform.
	SortOrder *string `json:"sortOrder,omitempty"`

	// A date used for selecting jobs created after (or at) a specified time must be in ISO 8601 format. Required if LastUpdatedAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
	CreatedAfter *string `json:"createdAfter,omitempty"`

	// A date used for selecting jobs created before (or at) a specified time must be in ISO 8601 format.
	CreatedBefore *string `json:"createdBefore,omitempty"`

	// A date used for selecting jobs updated after (or at) a specified time must be in ISO 8601 format. Required if createdAfter is not specified.Specifying both CreatedAfter and LastUpdatedAfter returns an error.
	LastUpdatedAfter *string `json:"lastUpdatedAfter,omitempty"`

	// A date used for selecting jobs updated before (or at) a specified time must be in ISO 8601 format.
	LastUpdatedBefore *string `json:"lastUpdatedBefore,omitempty"`

	// A date used for filtering jobs schedule after (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
	ScheduleStartDate *string `json:"scheduleStartDate,omitempty"`

	// A date used for filtering jobs schedule before (or at) a specified time must be in ISO 8601 format. schedule end date should not be earlier than schedule start date.
	ScheduleEndDate *string `json:"scheduleEndDate,omitempty"`

	// Used to select jobs that were placed in the specified marketplaces.
	MarketplaceIds []string `json:"marketplaceIds"`
}

// AddAppointmentForServiceJobByServiceJobIdJSONBody defines parameters for AddAppointmentForServiceJobByServiceJobId.
type AddAppointmentForServiceJobByServiceJobIdJSONBody AddAppointmentRequest

// RescheduleAppointmentForServiceJobByServiceJobIdJSONBody defines parameters for RescheduleAppointmentForServiceJobByServiceJobId.
type RescheduleAppointmentForServiceJobByServiceJobIdJSONBody RescheduleAppointmentRequest

// CancelServiceJobByServiceJobIdParams defines parameters for CancelServiceJobByServiceJobId.
type CancelServiceJobByServiceJobIdParams struct {

	// A cancel reason code that specifies the reason for cancelling a service job.
	CancellationReasonCode string `json:"cancellationReasonCode"`
}

// AddAppointmentForServiceJobByServiceJobIdRequestBody defines body for AddAppointmentForServiceJobByServiceJobId for application/json ContentType.
type AddAppointmentForServiceJobByServiceJobIdJSONRequestBody AddAppointmentForServiceJobByServiceJobIdJSONBody

// RescheduleAppointmentForServiceJobByServiceJobIdRequestBody defines body for RescheduleAppointmentForServiceJobByServiceJobId for application/json ContentType.
type RescheduleAppointmentForServiceJobByServiceJobIdJSONRequestBody RescheduleAppointmentForServiceJobByServiceJobIdJSONBody
