github.com/hashicorp/hcp-sdk-go@v0.94.0/clients/cloud-billing/preview/2020-11-05/models/billing20201105_address.go (about)

     1  // Code generated by go-swagger; DO NOT EDIT.
     2  
     3  package models
     4  
     5  // This file was generated by the swagger tool.
     6  // Editing this file might prove futile when you re-run the swagger generate command
     7  
     8  import (
     9  	"context"
    10  
    11  	"github.com/go-openapi/strfmt"
    12  	"github.com/go-openapi/swag"
    13  )
    14  
    15  // Billing20201105Address Address is a physical postal address.
    16  //
    17  // swagger:model billing_20201105Address
    18  type Billing20201105Address struct {
    19  
    20  	// city is a city, district, suburb, town, or village.
    21  	City string `json:"city,omitempty"`
    22  
    23  	// line1 is the street, PO Box, or company name.
    24  	Line1 string `json:"line1,omitempty"`
    25  
    26  	// line2 is the apartment, suite, unit, or building.
    27  	Line2 string `json:"line2,omitempty"`
    28  
    29  	// postal_code is the ZIP or postal code.
    30  	PostalCode string `json:"postal_code,omitempty"`
    31  
    32  	// state is a state, county, province, or region.
    33  	State string `json:"state,omitempty"`
    34  }
    35  
    36  // Validate validates this billing 20201105 address
    37  func (m *Billing20201105Address) Validate(formats strfmt.Registry) error {
    38  	return nil
    39  }
    40  
    41  // ContextValidate validates this billing 20201105 address based on context it is used
    42  func (m *Billing20201105Address) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
    43  	return nil
    44  }
    45  
    46  // MarshalBinary interface implementation
    47  func (m *Billing20201105Address) MarshalBinary() ([]byte, error) {
    48  	if m == nil {
    49  		return nil, nil
    50  	}
    51  	return swag.WriteJSON(m)
    52  }
    53  
    54  // UnmarshalBinary interface implementation
    55  func (m *Billing20201105Address) UnmarshalBinary(b []byte) error {
    56  	var res Billing20201105Address
    57  	if err := swag.ReadJSON(b, &res); err != nil {
    58  		return err
    59  	}
    60  	*m = res
    61  	return nil
    62  }