# Copyright 2023 Google LLC. All Rights Reserved.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
info:
  title: Compute/RouterPeer
  description: The Compute RouterPeer resource
  x-dcl-struct-name: RouterPeer
  x-dcl-has-iam: false
paths:
  get:
    description: The function used to get information about a RouterPeer
    parameters:
    - name: routerPeer
      required: true
      description: A full instance of a RouterPeer
  apply:
    description: The function used to apply information about a RouterPeer
    parameters:
    - name: routerPeer
      required: true
      description: A full instance of a RouterPeer
  delete:
    description: The function used to delete a RouterPeer
    parameters:
    - name: routerPeer
      required: true
      description: A full instance of a RouterPeer
  deleteAll:
    description: The function used to delete all RouterPeer
    parameters:
    - name: project
      required: true
      schema:
        type: string
    - name: location
      required: true
      schema:
        type: string
    - name: router
      required: true
      schema:
        type: string
  list:
    description: The function used to list information about many RouterPeer
    parameters:
    - name: project
      required: true
      schema:
        type: string
    - name: location
      required: true
      schema:
        type: string
    - name: router
      required: true
      schema:
        type: string
components:
  schemas:
    RouterPeer:
      title: RouterPeer
      x-dcl-id: projects/{{project}}/regions/{{location}}/routers/{{router}}
      x-dcl-parent-container: project
      x-dcl-has-create: true
      x-dcl-has-iam: false
      x-dcl-read-timeout: 0
      x-dcl-apply-timeout: 0
      x-dcl-delete-timeout: 0
      type: object
      required:
      - name
      - location
      - project
      - router
      properties:
        advertiseMode:
          type: string
          x-dcl-go-name: AdvertiseMode
          description: User-specified flag to indicate which mode to use for advertisement.
        advertisedGroups:
          type: array
          x-dcl-go-name: AdvertisedGroups
          description: User-specified list of prefix groups to advertise in custom
            mode
          x-dcl-send-empty: true
          x-dcl-list-type: list
          items:
            type: string
            x-dcl-go-type: string
        advertisedIPRanges:
          type: array
          x-dcl-go-name: AdvertisedIPRanges
          description: User-specified list of individual IP ranges to advertise in
            custom mode. This field can only be populated if advertiseMode is CUSTOM
          x-dcl-send-empty: true
          x-dcl-list-type: list
          items:
            type: object
            x-dcl-go-type: RouterPeerAdvertisedIPRanges
            properties:
              description:
                type: string
                x-dcl-go-name: Description
                description: User-specified description for the IP range.
              range:
                type: string
                x-dcl-go-name: Range
                description: The IP range to advertise. The value must be a CIDR-formatted
                  string.
        advertisedRoutePriority:
          type: integer
          format: int64
          x-dcl-go-name: AdvertisedRoutePriority
          description: The priority of routes advertised to this BGP peer. Where there
            is more than one matching route of maximum length, the routes with the
            lowest priority value win.
        interfaceName:
          type: string
          x-dcl-go-name: InterfaceName
          description: Name of the interface the BGP peer is associated with.
        ipAddress:
          type: string
          x-dcl-go-name: IPAddress
          description: IP address of the interface inside Google Cloud Platform. Only
            IPv4 is supported.
        location:
          type: string
          x-dcl-go-name: Location
          description: The location of the resource
          x-kubernetes-immutable: true
        managementType:
          type: string
          x-dcl-go-name: ManagementType
          readOnly: true
          description: The resource that configures and manages this BGP peer
          x-kubernetes-immutable: true
        name:
          type: string
          x-dcl-go-name: Name
          description: Name of this BGP peer
        peerAsn:
          type: integer
          format: int64
          x-dcl-go-name: PeerAsn
          description: Peer BGP Autonomous System Number (ASN). Each BGP interface
            may use a different value.
        peerIPAddress:
          type: string
          x-dcl-go-name: PeerIPAddress
          description: IP address of the BGP interface outside Google Cloud Platform.
            Only IPv4 is supported.
        project:
          type: string
          x-dcl-go-name: Project
          description: The project id of the resource
          x-kubernetes-immutable: true
          x-dcl-references:
          - resource: Cloudresourcemanager/Project
            field: name
            parent: true
        router:
          type: string
          x-dcl-go-name: Router
          description: 'Name of the router. The name must be 1-63 characters long,
            and comply with RFC1035. Specifically, the name must be 1-63 characters
            long and match the regular expression `[a-z]([-a-z0-9]*[a-z0-9])?` which
            means the first character must be a lowercase letter, and all following
            characters must be a dash, lowercase letter, or digit, except the last
            character, which cannot be a dash. '
          x-kubernetes-immutable: true
          x-dcl-references:
          - resource: Compute/Router
            field: name
            parent: true
