// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package groundstation import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" "github.com/aws/aws-sdk-go-v2/private/protocol" ) type GetSatelliteInput struct { _ struct{} `type:"structure"` // UUID of a satellite. // // SatelliteId is a required field SatelliteId *string `location:"uri" locationName:"satelliteId" type:"string" required:"true"` } // String returns the string representation func (s GetSatelliteInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *GetSatelliteInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "GetSatelliteInput"} if s.SatelliteId == nil { invalidParams.Add(aws.NewErrParamRequired("SatelliteId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // MarshalFields encodes the AWS API shape using the passed in protocol encoder. func (s GetSatelliteInput) MarshalFields(e protocol.FieldEncoder) error { e.SetValue(protocol.HeaderTarget, "Content-Type", protocol.StringValue("application/json"), protocol.Metadata{}) if s.SatelliteId != nil { v := *s.SatelliteId metadata := protocol.Metadata{} e.SetValue(protocol.PathTarget, "satelliteId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata) } return nil } type GetSatelliteOutput struct { _ struct{} `type:"structure"` // A list of ground stations to which the satellite is on-boarded. GroundStations []string `locationName:"groundStations" type:"list"` // NORAD satellite ID number. NoradSatelliteID *int64 `locationName:"noradSatelliteID" min:"1" type:"integer"` // ARN of a satellite. SatelliteArn *string `locationName:"satelliteArn" type:"string"` // UUID of a satellite. SatelliteId *string `locationName:"satelliteId" min:"1" type:"string"` } // String returns the string representation func (s GetSatelliteOutput) String() string { return awsutil.Prettify(s) } // MarshalFields encodes the AWS API shape using the passed in protocol encoder. func (s GetSatelliteOutput) MarshalFields(e protocol.FieldEncoder) error { if s.GroundStations != nil { v := s.GroundStations metadata := protocol.Metadata{} ls0 := e.List(protocol.BodyTarget, "groundStations", metadata) ls0.Start() for _, v1 := range v { ls0.ListAddValue(protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v1)}) } ls0.End() } if s.NoradSatelliteID != nil { v := *s.NoradSatelliteID metadata := protocol.Metadata{} e.SetValue(protocol.BodyTarget, "noradSatelliteID", protocol.Int64Value(v), metadata) } if s.SatelliteArn != nil { v := *s.SatelliteArn metadata := protocol.Metadata{} e.SetValue(protocol.BodyTarget, "satelliteArn", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata) } if s.SatelliteId != nil { v := *s.SatelliteId metadata := protocol.Metadata{} e.SetValue(protocol.BodyTarget, "satelliteId", protocol.QuotedValue{ValueMarshaler: protocol.StringValue(v)}, metadata) } return nil } const opGetSatellite = "GetSatellite" // GetSatelliteRequest returns a request value for making API operation for // AWS Ground Station. // // Returns a satellite. // // // Example sending a request using GetSatelliteRequest. // req := client.GetSatelliteRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/groundstation-2019-05-23/GetSatellite func (c *Client) GetSatelliteRequest(input *GetSatelliteInput) GetSatelliteRequest { op := &aws.Operation{ Name: opGetSatellite, HTTPMethod: "GET", HTTPPath: "/satellite/{satelliteId}", } if input == nil { input = &GetSatelliteInput{} } req := c.newRequest(op, input, &GetSatelliteOutput{}) return GetSatelliteRequest{Request: req, Input: input, Copy: c.GetSatelliteRequest} } // GetSatelliteRequest is the request type for the // GetSatellite API operation. type GetSatelliteRequest struct { *aws.Request Input *GetSatelliteInput Copy func(*GetSatelliteInput) GetSatelliteRequest } // Send marshals and sends the GetSatellite API request. func (r GetSatelliteRequest) Send(ctx context.Context) (*GetSatelliteResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &GetSatelliteResponse{ GetSatelliteOutput: r.Request.Data.(*GetSatelliteOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // GetSatelliteResponse is the response type for the // GetSatellite API operation. type GetSatelliteResponse struct { *GetSatelliteOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // GetSatellite request. func (r *GetSatelliteResponse) SDKResponseMetdata() *aws.Response { return r.response }